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

RadGridView update issue

4 Answers 311 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ola
Top achievements
Rank 1
Ola asked on 16 Oct 2014, 09:10 AM
Hi

I have a RadGridView with its ItemsSource bound to a RadObservableCollection. I have applied both custom filtering and grouping to the GridView.

The problem is that not all items are shown after the RadObservableCollection have been cleared and updated. It could be that I only see one row out of twelwe. There is space for the rest of the items but the area only shows the background color. Hovering the area does not do any difference. Only when I touch the scrollbar all rows appear.

Here is how I update the RadObservableCollection:

   VideoLossItems.SuspendNotifications();
   VideoLossItems.Clear();
   VideoLossItems.AddRange(items);
   VideoLossItems.ResumeNotifications();

I am attaching two files that show the difference.

Do you know what might be causing this issue? Is there a decent workaround for it?

4 Answers, 1 is accepted

Sort by
0
Ola
Top achievements
Rank 1
answered on 16 Oct 2014, 09:32 AM
Correction: I am not binding directly to the RadObservableCollection but to an ICollectionView that I get from the RadObservableCollection.

     public ICollectionView VideoLossItemsCollectionView
      {
         get
         {
            return _videoLossItemsCollectionView ?? (_videoLossItemsCollectionView = CollectionViewSource.GetDefaultView(VideoLossItems));
         }
      }

I have a filter applied to the ICollectionView.
0
Ola
Top achievements
Rank 1
answered on 16 Oct 2014, 11:30 AM
Disabling row virtualization on the GridView (EnableRowVirtualization="False") solves the immediate problem, but I will need to have the grid virtual in the final solution.
0
Dimitrina
Telerik team
answered on 16 Oct 2014, 03:45 PM
Hello,

Would you please try configuring RadGridView with GroupRenderMode="Flat"?

The Flat mode was introduced with Q2 2013 as a completely new logic for group rendering. The result was faster scrolling and very good performance, but it fixed a lot of other issues in group mode reproducible with the old Nested mode. 


Basically, if column virtualization is on, then only the rows in the view area are available, the rest of them are realized on demand. On the other hand, if it is disabled, then all the visual containers are initially realized. You can check our online documentation explaining how the UI virtualization works. 

Let me know the result.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ola
Top achievements
Rank 1
answered on 16 Oct 2014, 08:20 PM
Yes, it looks like GroupRenderMode="Flat" solved the issue. My data looks a bit different right now though, so I cant be 100% sure that it is working. I will get back to you if the problem reappears.

Thank you for helping.
Tags
GridView
Asked by
Ola
Top achievements
Rank 1
Answers by
Ola
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or