Background:I have an application that contains the UltraWinGrid, and there is enough data to cause a vertical scroll bar, thats fine, the scrolling works fine.
I want to double click rows form the UltraWinGrid to cause a showdialog of a form, works fine.
When the dialog form shows up, and I then close it, I re-assign the UltraWinGrid datasource from the database.
Problem:When I close the dialog form and re-assign the datasource from the DataTable, the UltraWinGrid goes back to the top, and ignores the fact that I had it scrolled down.
Can somebody please help me with this?
before you change the datasource save the following in a variable:
pos = ultraGrid1.Rows.IndexOf(ultraGrid1.ActiveRowScrollRegion.FirstRow);
after you change the datasource, set the following:
ultraGrid1.ActiveRowScrollRegion.FirstRow = ultraGrid1.Rows[pos];
Thanks guys, this works if there is no group by (without drag a column header here to group by that column).
Sorry, I didn't explain this in the original post.
I have "drag a column" enabled.
Is there a way to capture the expanded rows and then re-expand them again if they are still available?