Introduction
Here are a couple overloaded functions I wrote that allow you to set multiple columns visible or not using a ParamArray.
I'm pretty sure these would work with Web forms also but I don't have time to test them to find out.
Imports FarPoint.Win.Spread
Public Class FarPointUtils
''' -----------------------------------------------------------------------------
''' <summary>
''' Converts a ParamArray of columns into individual SetColumnVisible calls. Accepts individual columns (eg 1, 2, 3, 7, 8) or ranges designated by key words Thru, To or dash '-' (eg 2 to 5 or 3 Thru 6 or 2-5). The key words Thru and To are case insensitive. If key words are used the entire phrase MUST be surrounded by double quotes (eg "0 - 4" or "1 to 3").
''' </summary>
''' <param name="farPointSheet"></param>
''' <param name="visible">False to hide column, otherwise True</param>
''' <param name="columns">Comma delimited list of columns to affect</param>
''' <remarks>
''' </remarks>
''' <history>
''' [glw2] 11/18/2005 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Shared Sub SetColumnVisibility(ByVal farPointSheet As FarPoint.Win.Spread.SheetView, _
ByVal visible As Boolean, _
ByVal ParamArray columns() As Object)
If columns.Length = 0 Then Return