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
1240
Selected Record being scrolled out of view
posted

I’ve got a grid that I’m setting the TopViewRecord followed by calling BringRecordIntoView to select a given record, and scroll it into view.  After that occurs, more records may be added to the grid.  If the new records fall after the selected record, it all works fine.  However, if they fall before the selected record, the selected record scrolls out of view.  Is there a way the grid can retain the selected record and keep it in view even if records are added/deleted before the selected record?

Thanks

Dan

Parents
No Data
Reply
  • 69686
    posted

    Hello Dan,

    As far as I know there is no such supported functionality. It depends on how you choose which record to remain always in view, but when you add a record (before the desired one) in the datasource the records change their indexes(e.g. the fifth record will not be the same when you add a new record before it). You can implement this functionality by handling, for example, RecordsInViewChanged or RecordUpdated events and BringIntoView the record, identified not by the index in the datasource but a unique value in the data record.

    Alex.

Children
No Data