This is a migrated thread and some comments may be shown as answers.

ItemsSource changes problem

3 Answers 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Francisco Amador
Top achievements
Rank 1
Francisco Amador asked on 21 Jul 2010, 06:34 PM
I'm not sure how to describe my problem. In my project I have to have four sets of data that I have to switch between as the ItemsSource of my Gridview. Initially I was rebinding the ItemsSource each time I needed to switch and things were working fine. Now I had to switch to having the ItemsSource bound to one RadObservableCollection and then clearing it and filling it with the data from the other collections (This was much faster). This new method works like this:

private static void ReplaceObservableCollectionContents<T>(RadObservableCollection<T> destination, RadObservableCollection<T> source)
{
    destination.SuspendNotifications();
    destination.Clear();
    destination.AddRange(source);
    destination.ResumeNotifications();
}

While this switch is occurring, the grid is being grouped and filtered. Before this step worked fine, but now it shows the information it should, but then shows the whole grouped dataset without the filtering tacked on at the end. In the image attached you will see that the grid is grouped by regions and supposed to be filtering by "Africa". The first group is the correct one, and then the rest are not supposed to be there. I tried switching to an older dll (was using the 716 version of Q2), but it was still occurring there.

If you know of another way of switching between datasets, I would be glad to try them. Maybe that will fix/bypass the problem that is causing the gridview to get confused. I know the best thing for you would be for me to recreate the issue in a sample project, but I really don't think I can simplify my project enough to recreate the issue. I will probably try creating a sample project later tonight though.

3 Answers, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 21 Jul 2010, 06:58 PM
Hi Francisco Amador,

A sample project would really help us pinpoint the problem faster. Are you using Asynchronous DataLoadMode by any chance?


Sincerely yours,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Francisco Amador
Top achievements
Rank 1
answered on 21 Jul 2010, 07:24 PM
Yes, I had it as Asynchronous so that it would show that it was working during the 2-4 seconds it takes for the source to update. I switched that back and that seems to have fixed the issue. Any particular reason that this happens with that particular dataload type?
0
Milan
Telerik team
answered on 22 Jul 2010, 07:02 AM
Hello Francisco Amador,

Well, this is a known issue with our Async DataLoadMode which rarely manifests but your scenario triggers the bug every time, or at least very often. 

We will raise the priority for this issue.


All the best,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Francisco Amador
Top achievements
Rank 1
Answers by
Milan
Telerik team
Francisco Amador
Top achievements
Rank 1
Share this question
or