I am using the advanced databinding technique (OnNeedDataSource) in a grid that is in a user control, inside a splitter pane, and controlled by a combobox. Fun!
User control has a combobox and grid in it, and when an item is selected from the combobox it causes the grid to be re-filled with that combobox item as a filter of sorts.
Used to be, the filtering worked but when I did any paging on the grid, the grid disappeared! It looks like to correct that issue I need to take the advanced databinding technique using the OnNeedDataSource. So I've done that and now the grid does not disappear when paging.
However, what I'm seeing is that when I do paging in the grid, then use the combobox to select a different value to filter the grid on, the grid *is* re-getting the modified datasource however it is *not* resetting its current page number. It's remembering whatever the last page number was when I really want it to reset and start fresh upon a combobox selection change.
I tried just setting the grid datasource to null before the calls to get its datasource and rebind, but that doesn't seem to do the trick.
What's the correct way to force the grid to reset its page number?
Thx
User control has a combobox and grid in it, and when an item is selected from the combobox it causes the grid to be re-filled with that combobox item as a filter of sorts.
Used to be, the filtering worked but when I did any paging on the grid, the grid disappeared! It looks like to correct that issue I need to take the advanced databinding technique using the OnNeedDataSource. So I've done that and now the grid does not disappear when paging.
However, what I'm seeing is that when I do paging in the grid, then use the combobox to select a different value to filter the grid on, the grid *is* re-getting the modified datasource however it is *not* resetting its current page number. It's remembering whatever the last page number was when I really want it to reset and start fresh upon a combobox selection change.
I tried just setting the grid datasource to null before the calls to get its datasource and rebind, but that doesn't seem to do the trick.
What's the correct way to force the grid to reset its page number?
Thx