I want to add a column filter for my datagrid.
I'm using check boxes, so when a column name is unchecked, the column will be hidden and vise versa.
my problem is that i cant get the column to unhide (when checking the checkbox)
i use the following code:
I'm able to hide the column, but not to make it visible again.
does anyone has any idea?
I'm using check boxes, so when a column name is unchecked, the column will be hidden and vise versa.
my problem is that i cant get the column to unhide (when checking the checkbox)
i use the following code:
VB.NET:
Private Sub changeColumnsVis(ByRef list As ArrayList, ByVal hideFlag As Boolean)
Dim mappingTypeFlag As System.data.MappingType
If hideFlag = False Then
mappingTypeFlag = MappingType.Element
Else
mappingTypeFlag = MappingType.Hidden
End If
For Each hideMe As String In list
If Me.containsColumn(hideMe) Then
Dim column As DataColumn = Me.getColumn(hideMe)
column.ColumnMapping = mappingTypeFlag
End If
Next
DataGrid1.DataSource = dv
End Sub
I'm able to hide the column, but not to make it visible again.
does anyone has any idea?
Last edited by a moderator: