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
1365
Returning to exact grid position
posted

Hi, i have a wingrid that is being refreshed on  a timer which basically resets the current viewing area back to the top. I want to be returned right back to where i was before the refresh.(also saving/reloading) the layout of the grid

i tried this which doesn't quite work 100%

Does anyone have a recommendation on this?

  using (MemoryStream s = new MemoryStream())
            {
                int irow = ultraGridWatch.ActiveRowScrollRegion.ScrollPosition;
                int icol = ultraGridWatch.ActiveColScrollRegion.Position;
                ultraGridWatch.DisplayLayout.Save(s);
                s.Position = 0;

                PerformMyRefreshFunction();

                ultraGridWatch.DisplayLayout.Load(s, PropertyCategories.All);
                ultraGridWatch.ActiveRowScrollRegion.ScrollPosition = irow;
                
                ultraGridWatch.ActiveColScrollRegion.Position = icol;

            }