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

Grid requests all virtual pages between two selected rows

5 Answers 98 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Yuliya
Top achievements
Rank 1
Yuliya asked on 20 Aug 2014, 02:32 PM
Hi guys,

I get the following issue on the version 2014.2.0617.45:

When I select one row on top of the grid, then scroll down, and try to select other row - all the pages in between are getting loaded. The issue haven't reproduced on earlier version (2013.2.724.40).

Here is the code to reproduce the problem:
View:

<Window x:Class="RadGridView_Virtualization.MainWindow"
        xmlns:local="clr-namespace:RadGridView_Virtualization"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <local:MyViewModel x:Key="MyViewModel" />
    </Window.Resources>
         
    <Grid DataContext="{StaticResource MyViewModel}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <telerik:RadGridView x:Name="gridAccessList"
                              Height="240"
                              Width="370"
                             IsFilteringAllowed="False" CanUserReorderColumns="True"
                              AutoGenerateColumns="False"
                              ItemsSource="{Binding Path=Items}"
                             EnableRowVirtualization="True"
                             SelectionMode="Extended"
                             ScrollViewer.IsDeferredScrollingEnabled="True" IsReadOnly="True"
                             ShowGroupPanel="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Id}"
                                                            Width="*"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>

ViewModel:

using System.Collections.Generic;
using System.ComponentModel;
using Telerik.Windows.Data;
 
namespace RadGridView_Virtualization
{
    public class MyViewModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
 
        public MyViewModel()
        {
            Items = new VirtualQueryableCollectionView<DummyData>
              {
                VirtualItemCount = LoadSize, LoadSize = this.LoadSize
              };
 
          Items.ItemsLoading += OnItemsLoading;
        }
 
    private void OnItemsLoading(object sender, VirtualQueryableCollectionViewItemsLoadingEventArgs args)
    {
      Items.VirtualItemCount = 35000;
 
      Source = new List<DummyData>();
 
      for (int i = 0; i < args.ItemCount; i++)
      {
        Source.Add(new DummyData { Id = args.StartIndex + i });
      }
 
      Items.Load(args.StartIndex, Source);
    }
 
      private List<DummyData> source;
        public List<DummyData> Source
        {
            get { return this.source; }
            set { this.source = value; }
        }
 
        private int loadSize = 100;
        public int LoadSize
        {
            get { return loadSize; }
            set { loadSize = value; }
        }
 
        public VirtualQueryableCollectionView<DummyData> Items { get; private set; }
 
        public class DummyData
        {
            public int Id { get; set; }
        }
    }
}

If you put a breakpoint in OnItemsLoading method - you'll see that grid requests all pages between two selected rows. Please, note, that it happens after regular single row selection, so no data pages in the middle of two selected rows are not needed.

5 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 25 Aug 2014, 12:37 PM
Hi Yulia,

Thank you for the provided information. We were able to reproduce the problem. I will post in this thread as soon as I have any further information on the matter. 


Regards,
Nik
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Mads
Top achievements
Rank 1
answered on 18 Sep 2014, 08:52 AM
Hi Nik

Is there any updates on this issue?
0
Nick
Telerik team
answered on 19 Sep 2014, 09:45 AM
Hi Mads,

We have still not found the exact cause of the problem. It is Reproducable only when the selection mode of RadGridView is Extended. We are working on pin pointing the exact problem, and will post as soon as there is any progress on the matter. 

Regards,
Nik
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Yuliya
Top achievements
Rank 1
answered on 17 Dec 2014, 03:26 PM
Hi, Nick,

Is there any progress with the specified problem?
I've also noticed similar issue with Shift-selection between multiple pages: the data is loaded  twice! So, when I select some row, then scroll down to the grid, and close selection with Shift - all the pages between selected rows are retrieved twice.

I've checked both this issues on version 2013.2.724.40 - none of them existed.
0
Nick
Telerik team
answered on 19 Dec 2014, 02:23 PM
Hi Yulia,

The issue is still not resolved. You can track the progress in our feedback portal.

Regards,
Nick
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.

 
Tags
GridView
Asked by
Yuliya
Top achievements
Rank 1
Answers by
Nick
Telerik team
Mads
Top achievements
Rank 1
Yuliya
Top achievements
Rank 1
Share this question
or