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
95
XamDataGrid scrolling through a long list quickly and using Shift-click doesn't select all items
posted

I have the following XamDataGrid

Grid.Row="1"
SelectedItemsChanged="xamDataGridResult_SelectedItemsChanged"
GroupByAreaLocation="None"
AutoFit="False"
IsSynchronizedWithCurrentItem="True"
ScrollingMode="Immediate"
DataSource="{Binding QueryResultsWrapper.QueryResults}"
MouseDoubleClick="OnGridResultMouseDoubleClick"
EditModeStarting="OnGridResultEditModeStarting"
EditModeStarted="OnGridResultEditModeStarted"
EditModeEnding="OnGridResultEditModeEnding"
EditModeEnded="OnGridResultEditModeEnded"
RecordContainerGenerationMode="PreLoad">

The XamDataGrid often includes hundreds of items. If I select the top item and scroll all the way down quickly, then select the bottom item, then scroll up through the list, some of the items are not selected. It seems as though during the initial scroll down there are segments where it isn't smooth and the scrollbar skips a bit, and I guess those items aren't loading because their IsSelected property isn't being set when I shift-click the bottom item, essentially attempting to select all the items.

Is this a bug or am I missing a property? I was under the impression that PreLoad would make all the items load as soon as they enter the grid.

  • 14517
    Offline posted

    Hello Mark,

    I followed the steps you suggested and was unable to reproduce the behavior you're describing.  I created a XamDataGrid using your xaml and bound the grid to a collection view source. I then ran the sample and selected the first row while holding down the shift key and scrolled to the last row and selected it. After this, all of the rows were selected.

    I have attached the sample project I used to test this.  Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.

    If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using.  My test was performed using version 15.2.20152.2024 in NetAdvantage for WPF 2015 Volume 2.

    If the project does show the product feature working correctly, this indicates a possible problem in the code of your application.  It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.

    Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.

    Please let me know if I can provide any further assistance.

    Sincerely,

    Valerie

    Software Developer

    Infragistics Inc

    WpfApplication1.zip