Can anyone tell me how to force the ultragrid to display row 0 after I apply my grid filter?
I have tried these with no success--
ultragrid1.DisplayLayout.ActiveRow = ultragrid1.Rows(0)
ultragrid1.ActiveRow = ultragrid1.Rows(0)
ultragrid1.Rows(0).Activate()
ultragrid1.ActiveRow = ultragrid1.GetRow(Infragistics.Win.UltraWinGrid.ChildRow.First)
I would think a PerformAction to something like the FirstGridCell or something along those lines would do it.
Nick
Nick,
thanks for the tip. i thought that would work, but it did not.
I think it must have something to do with the filters being applied.
After I apply the filters I do this - ultragrid1.PerformAction(UltraGridAction.FirstRowInBand).
But the grid always ends up at the bottom of the grid.
I am still looking for a solution.
-duane
Mike,
I do not use the grid column filters. My filters are built in my code and they are working. But the BeforeRowFilterChanged event does not fire with filters built in code.
I am assuming that I can not use my filters built in code and use the BeforeRowFilterChanged event.
Is that correct?
Filters are applied to the grid asynchronously by default. So if you use the AfterRowFilterChanged event or try to do this immediately after applying a filter in code, it probably won't work. In order for this to work, you would have to force the filtering to be performed synchronously. You can do this by handling the BeforeRowFilterChanged event and setting the ProcessMode to Synchronous. Then you could use AfterRowFilterChanged and then either Nick or Matt's suggestions will probably work.