I have a grid with 2 subgrids. This hierachy is defined in the xaml with the ChildTableDefinitions property. The child grids have
in order to avoid a clutter of scrollbars. Also row virtualization has been turned off for as well the main grid as the child grids.
Now I'm implementing a refresh operation. During this, I want to reselect the item that was selected before the refresh was started (there is only one item selected in all these grids). I do this by expanding the appropriate rows until I reach the grid with the item to be selected. Then I set that grid's SelectedItem property.
So far so good. For obvious reasons I want to scroll the selected item back into view. When the selected row was in the main grid, I can just perform a
But when I do this for a childgrid, nothing happens. I presume because the child grid doesn't have a scrollbar and as far as this grid is concerned, the selected row is in view. Also when I try
nothing happens. I guess because objSel is not in the ItemsSource of the main grid (I didn't expect it to work, but I had to try). Also
did not work out.
So I wonder what is a correct approach to scroll the selected item into view.
Thanks in advance,
Herre
[ OS: W7; Telerik: WPF 2013.3.1316.40 ]
grd.MaxHeight =
double
.PositiveInfinity;
Now I'm implementing a refresh operation. During this, I want to reselect the item that was selected before the refresh was started (there is only one item selected in all these grids). I do this by expanding the appropriate rows until I reach the grid with the item to be selected. Then I set that grid's SelectedItem property.
So far so good. For obvious reasons I want to scroll the selected item back into view. When the selected row was in the main grid, I can just perform a
grd.ScrollIntoView(objSel);
grdMain.ScrollIntoView(objSel);
grd.BringIntoView();
So I wonder what is a correct approach to scroll the selected item into view.
Thanks in advance,
Herre
[ OS: W7; Telerik: WPF 2013.3.1316.40 ]