I have a hierarchic GridView and I want to scroll to the selected row after a new databind of the control.
If I do
no problem if the current row is a parent row but if the current row is a child row the GridView scroll to the end.
How to scroll to a selected child row?
4 Answers, 1 is accepted
You could try parsing the Rows collection of the grid view or the Template's Row collection if you just want child rows, and when you reach your desired row you could just call EnsureVisible() on that row.
Hope this helps, if you have any other questions or comments, please let me know,
Telerik WinForms MVP
When I ribind the GridView the selected row is no longer in the datasource because its state change and the rows are filtered. At the end of the function, my intention is that the current row is the following row than the original selected and the GridView scroll to ensure the new selected row is visible. If the orginal selected row is a child row, the following row is selected but the GridView doesn't scroll to ensure that is visible. I have WinControl version 2010.3.10.1215.
What I can do?
Thank you for writing.
Have you tried your scenario with the latest release Q1 2011 SP1 (2011.1.11.419) ? It contains many fixes and numerous improvements. It is possible that described case could work properly.
Let me know whether the latest version helped.
the Telerik team