Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
ScrollRowIntoView and ActiveRowScrollRegion.FirstRow within InitializeGroupByRow
posted

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.

 

 

 

Parents
No Data
Reply
  • 2334
    posted

    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>

Children