Please bear with me for the setup.
I have 2 or more Observable collections that I bind to the XamDataGrid at runtime based on a user preference. These collections are also paginated (500 at a time) and loaded on demand. The loading occurs when the users scrolls within 25 records of the xamDataGrid.GetRecordsInView() last viewable record.
This all works perfectly if and only if I do not change the XamDataGrid.DataSource.
When I do change the datasource the XamDataGrid does change as well to the proper collection, column headers change, everthing looks great. As I scroll though and get to the 475th (500 - 25 record buffer) visible record the code fires to load the next 500. It loads in the observable collection, increases the count to 1,000. The grid however does not load the next 500 records. It's record count says at 500. I end up being stuck basically because the grid has 500 records loaded, but the collection has 1,000.
To be clear if I run my app and do not change the datasource on the fly, everything works fine. This only happens when I change collections at run time.
I hope I gave enough explanation here. If not ask away and I will answer.
Thank you for quick responses and service link for issue.
Hello again,
Andrew Smith has come up with another way around this issue by wrapping your datasource with a ListCollectionView like this:
xamDataGrid1.DataSource = new ListCollectionView(twos.AllTwos);
Nevermind that, we believe that there is an issue, because it should be working with ObservableCollection as well. I have created a support case on your behalf and going to link your case to this issue. You will be automatically notified when it is fixed and the Service Release is out.
Regards,
Alex.
Confirmed.
Switching to BindingList over a ObservableCollection corrected my issue.
Hello,
I tried your sample and changed ObservableCollection to BindingList and it works correctly.
Ok i got winzip 12.1 and I used legacy zip to make this file.
I am really looking forward to your comments on this.