hello,
I allow my customers to save layouts on every grid and it loads the layout when they go to the specific grid.
My problem is that when I use a custom filter on a money column and use "Greater Than" and "0", it works fine right then, but when the grid loads the layout on the next opening of the grid, the filter is not properly applied. There are no rows in the grid even though I have hundreds of records that are greater than Zero. If I clear the filter, all the rows show up.
Thanks in advance.
Philip Carter
Hi Philip,
There's not really enough information here for me to guess what's happening.
What exactly is happening when you reload the grid? Are you setting a new data source? Loading the layout?
Also, what version of the controls are you using?
Can you reproduce the problem in a small sample project?
My best guess is that the filter being loaded is somehow corrupted. Like maybe you are setting some filtering in the InitializeLayout event after the load occurs and this is causing the same filter to be done twice or something like that. You could examine the ColumnFilters for each column in the grid after you load the layout and see what's in there that is resulting in all of the rows being filter out.
here's how I load the grid
dCom.CommandText = "Select GridLayout from MarketplaceDefaultGridLayouts where GridName = '" & GridName.Replace("'", "''") & "'"
dr = dCom.ExecuteReader(CommandBehavior.SingleResult)
If dr.Read Then
Dim data() As Byte
data = dr(0)
ultragrid.DisplayLayout.Load(New System.IO.MemoryStream(data), Infragistics.Win.UltraWinGrid.PropertyCategories.All)
End If
dr.Close()
dCon.Close()
The loading of the grid happens after the datasource is set.
A grid that has over 100 rows with the filter saved as Backlog > 0 in a custom column filter (your custom filtering using excel column filtering) then reloads and has no rows.
does that make more sense?