I would like to set certain Group By row to be visible during grid initialisation. So within InitializeGroupByRow I am checking if row.ValueAsDisplayText is equal to the needed value and then perform scrolling
if ("NeededValue" == e.Row.ValueAsDisplayText){ //expand row.Expanded = true; //scroll ultraGridSubscriptionManager.ActiveRowScrollRegion.ScrollRowIntoView(e.Row); ultraGridSubscriptionManager.ActiveRowScrollRegion.FirstRow = e.Row;
}
However, the last two calls seems to be ignored.
The row is expanded but not scrolled to the first position.
The same happening if I emulate scroll using ActiveRowScrollRegion.Scroll(RowScrollAction.LineDown)
Please advise.
InitializeRow event fires as each row is initializing. So when you find the "NeededValue" the grid most likely does not yet have all of the data rows so it would be unable to scroll to the desired position. I would recommend setting FirstRow and calling ScrollRowIntoView after the grid is totally initialized. <br><br>
grid.DataSource = myDataSource;<br>
grid.ActiveRowScrollRegion.ScrollRowIntoView(theDesiredRow);<br>
grid.ActiveRowScrollRegion.FirstRow = theDesiredRow;<Br>
Thank you for suggestion. But I am talking about InitializeGroupByRow not InitializeRow. But the time InitializeGroupByRow is fired everything theoretically should be in place.
However, I will be happy to re-scroll when the grid is totally initialized. Do you know how can I identify that the grid is initialized? I was trying to re-scroll after the UltraDataSource is completly updated (the grid is more or less static from the point of the data), but by this time Grid was not ready: the GroupBy rows have not been created yet.