This question is locked. New answers and comments are not allowed.
I have a hierarchical GridView and a typical use case is to
- scroll down to the row I'm interested
- click the plus sign to open the child grid
- having to scroll further down in order to see the content of the child grid
What I want:
- Have the selected row scroll to the top of the currently visible area (showing the child grid content visible right below)
Any ideas?
I already tried the following:
- Using the current GridViewScrollViewer I ScrollToVerticalOffset(scrollViewer.VerticalOffset + scrollViewer.ViewportHeight) and then ScrollIntoView(this.ClickedRow) where ClickedRow is the actual parent row as determined by another click event; Result: doesn't scroll to parent row but to what appears to be the middle of the parent row + the parent row content (child grid)
- Calculating the height of all the rows prior to the currently selected and scrolling to index * (rows*rowHeight); Result: doesn't take into consideration any rows that are expanded (showing childgrids)
- A bunch of other things that all lead me down the wrong path
- scroll down to the row I'm interested
- click the plus sign to open the child grid
- having to scroll further down in order to see the content of the child grid
What I want:
- Have the selected row scroll to the top of the currently visible area (showing the child grid content visible right below)
Any ideas?
I already tried the following:
- Using the current GridViewScrollViewer I ScrollToVerticalOffset(scrollViewer.VerticalOffset + scrollViewer.ViewportHeight) and then ScrollIntoView(this.ClickedRow) where ClickedRow is the actual parent row as determined by another click event; Result: doesn't scroll to parent row but to what appears to be the middle of the parent row + the parent row content (child grid)
- Calculating the height of all the rows prior to the currently selected and scrolling to index * (rows*rowHeight); Result: doesn't take into consideration any rows that are expanded (showing childgrids)
- A bunch of other things that all lead me down the wrong path