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
1150
Scroll after row expansion child rows are fully visible
posted

Hi,

I would like to add a behaviour to my grid, so that all child rows are fully visible when the user expands a row.

So when expanding a row, and the child rows exceed the available space below the root row, it should scroll down far enough for all (or at least as many as possible) child rows to be visible.

Also, I would prefer a solution without DataPresenterCommands.RecordBelow etc. because selection changes are expensive (each selection change loads certain data in my grid) and selection changes may not be possible at all if the user is currently editing a row.

Can you provide me with any hints on such an implementation?

Parents
  • 30945
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking intot he functionality that you are trying to achieve and I can suggest using the BringRecordIntoView method of the XamDataGrid and its RecordExopaned event. In the event handler for the event you can call the BringRecordIntoView method and pass the first child record of the record that is expanded as parameter for the method. This way the XamDataGrid will scroll the first child record of the currently expanded record at top and this will result in showing as much child records as possible. I have created a sample application for you, that demonstrates how you can implement this approach.

     

    If you need any further assistance please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    ScrollChildrenIntoViewOnExpand.zip
Reply Children