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
1590
Disable autoscroll when setting ActiveRecord
posted

Hi, when you set the ActiveRecord of the XamDataGrid programmatically, the grid automatically scrolls that record into view. Is it possible to prevent that kind of behavior?

Regards, Stefan

Parents
  • 1590
    Verified Answer
    Offline posted

    Never mind, I managed to rescroll to the same position after the programmatical selection:

    double vScroll = double.NaN;

    if (this.ScrollInfo.CanVerticallyScroll)
       vScroll = this.ScrollInfo.VerticalOffset;

    // ... programmatical selection

    if (this.ScrollInfo.CanVerticallyScroll)
       this.ScrollInfo.SetVerticalOffset(vScroll);

    Regards, Stefan

Reply Children
No Data