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
585
XamDataGrid with ScrollingMode=Deferred
posted

I have attached a sample app that shows my issue.

I have details inside the zipped project sample itself.

It is a very particular issue in the sense of deferred scrolling and thumb scrolling to the very top or bottom. Clicking the up/down arrows on the scroll bar do not reproduce the issue. Moreover thumb scrolling to just before the very bottom or just before the very top also does not reproduce the problem. So please be aware of this. Lastly changing the scroll mode to immediate fixes the problem, but in my situation I need it to be deferred.

1. Xamdatagrid with deferred scrolling

2. Event tied to ScrollViewer.ScrollChanged. This is where I inspect the indexes of the visible rows.

3. Thumb scrolling the data grid all the way to the very bottom or all the way to very top, I do not see the scrollchanged event fire for those rows. I bolded below the 2 lines of code important to this issue.

private void xamDataGrid1_ScrollChanged(object sender, ScrollChangedEventArgs e)

        {

            //I expect to see every visible row index come through here. If I thumb scroll all the way to the bottom, I do not.

            Infragistics.Windows.DataPresenter.Record[] ViewableRows = MainGrid.GetRecordsInView(false);            

            debugCounter++;

            WriteOutLocally(debugCounter.ToString() + ". " + ViewableRows[1].Index.ToString() + " - " + ViewableRows[ViewableRows.Length - 1].Index.ToString());

        }

Here is what the log file that I write out looks like, notice after thumb scrolling all the way to the bottom it says the visible rows are still 1-18. I suspect the very last scroll change event did not happen:

    1. 1 - 18 6/14/2012 5:36:04 PM

    2. 1 - 18 6/14/2012 5:36:04 PM

    3. 1 - 18 6/14/2012 5:36:07 PM

    4. 1 - 18 6/14/2012 5:36:07 PM

    5. 1 - 18 6/14/2012 5:36:07 PM

    6. 1 - 18 6/14/2012 5:36:07 PM

    7. 1 - 18 6/14/2012 5:36:07 PM

    8. 1 - 18 6/14/2012 5:36:07 PM

    9. 1 - 18 6/14/2012 5:36:07 PM

    10. 1 - 18 6/14/2012 5:36:07 PM

    11. 1 - 18 6/14/2012 5:36:07 PM

    12. 1 - 18 6/14/2012 5:36:07 PM

    13. 1 - 18 6/14/2012 5:36:07 PM

    14. 1 - 18 6/14/2012 5:36:07 PM

    15. 1 - 18 6/14/2012 5:36:07 PM

    16. 1 - 18 6/14/2012 5:36:07 PM

    17. 1 - 18 6/14/2012 5:36:07 PM

    18. 1 - 18 6/14/2012 5:36:07 PM

    19. 1 - 18 6/14/2012 5:36:07 PM

    20. 1 - 18 6/14/2012 5:36:07 PM

    21. 1 - 18 6/14/2012 5:36:07 PM

    22. 1 - 18 6/14/2012 5:36:07 PM

    23. 1 - 18 6/14/2012 5:36:07 PM

    24. 1 - 18 6/14/2012 5:36:07 PM

    25. 1 - 18 6/14/2012 5:36:07 PM

    26. 1 - 18 6/14/2012 5:36:07 PM

    27. 1 - 18 6/14/2012 5:36:07 PM

    28. 1 - 18 6/14/2012 5:36:07 PM

    29. 1 - 18 6/14/2012 5:36:07 PM

    30. 1 - 18 6/14/2012 5:36:07 PM

    31. 1 - 18 6/14/2012 5:36:07 PM

    32. 1 - 18 6/14/2012 5:36:07 PM

    33. 1 - 18 6/14/2012 5:36:07 PM

    34. 1 - 18 6/14/2012 5:36:07 PM

    35. 1 - 18 6/14/2012 5:36:07 PM <-- im looking at records 982 - 1000 but it never hits the scroll change event.

 

InfragisticsScrollingTest.zip