Hi,
I'm using a grid which is using a hierarchical view. I'm trying to apply a filter to one of the columns on the parent grid, which contains a simple Y/N character.
I've constructed the filter in the same way as I would on a simple grid view (on which it does what I ask of it) This is the code:
The filter on the parent column appears on the grid and is populated once I apply the filter. However the data doesn't change. Infact, manually adjusting any of the column filters has no influence over the data at all.
Could someone please help me with where i'm going wrong? Like I said, on a simple grid, it works perfectly, I just cant get the parent/child grid to work correctly. I've spent the afternoon trying various things from example code but still no luck!
nb. the grid is bound to a datatable datasource.
Thanks in advance
Chris
Update: I fixed this by removing the grid from the form and adding a new one?! bizarre.
I'm using a grid which is using a hierarchical view. I'm trying to apply a filter to one of the columns on the parent grid, which contains a simple Y/N character.
I've constructed the filter in the same way as I would on a simple grid view (on which it does what I ask of it) This is the code:
rgvResults.MasterTemplate.EnableFiltering =
True
Dim
filter
As
New
FilterDescriptor()
filter.PropertyName =
"attrib_exists"
filter.[Operator] = FilterOperator.IsEqualTo
filter.Value =
"Y"
filter.IsFilterEditor =
True
rgvResults.MasterTemplate.FilterDescriptors.Add(filter)
rgvResults.MasterTemplate.Columns(
"attrib_exists"
).FilterDescriptor = filter
rgvResults.MasterTemplate.Refresh()
The filter on the parent column appears on the grid and is populated once I apply the filter. However the data doesn't change. Infact, manually adjusting any of the column filters has no influence over the data at all.
Could someone please help me with where i'm going wrong? Like I said, on a simple grid, it works perfectly, I just cant get the parent/child grid to work correctly. I've spent the afternoon trying various things from example code but still no luck!
nb. the grid is bound to a datatable datasource.
Thanks in advance
Chris
Update: I fixed this by removing the grid from the form and adding a new one?! bizarre.