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

GridView, DataPager and Virtualization issue

8 Answers 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 09 Nov 2011, 09:46 PM
I'm using a GridView, DataPager and VirtualQueryableCollectionView for loading my data.  The loading part is working as expected, but I see some glitch and I'm not sure if it's a issue with your controls or a setting that I'm missing somewhere.

This is the issue:
  1. I'm loading/navigating to a new page, I can see the "+" sign from the details row for 10 items.
  2. The data is loaded and shown in the UI, but I still can see 10 more "+" sign below without the vertical scrollbar. This is not expexted.
  3. I navigate to another page and come back to a previously loaded page, and everything look as expected.

I've attach an image that show the 3 state above.

Thanks

8 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 10 Nov 2011, 08:09 AM
Hi Gabriel,

 Can you post LoadSize/PageSize settings for the virtual collection?

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Gabriel
Top achievements
Rank 1
answered on 10 Nov 2011, 03:09 PM
My LoadSize and PageSize are set to 10 when creating the virtual collection.
0
Gabriel
Top achievements
Rank 1
answered on 10 Nov 2011, 07:37 PM
I've set a breakpoint in the RowLoaded event of the GridView, I can see that the e.Row.DataContext is set to an object type = object{DynamicClass1}, which I did not request. I do not think it's coming from the VirtualQueryableCollectionView that is bind to my DataPager.
0
Vlad
Telerik team
answered on 11 Nov 2011, 07:52 AM
Hello,

 This class is from the virtual collection. The class is just a temporary dynamic copy of the original data item (with properties) since the item is not yet loaded. When the real item is loaded this temporary item will be replaced.

Best wishes,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Gabriel
Top achievements
Rank 1
answered on 11 Nov 2011, 03:20 PM
My issue is that they are still showing in the gridview (see second gridview in the image on the original post), I have to navigate away and come back to see them disappears
0
Accepted
Vlad
Telerik team
answered on 14 Nov 2011, 10:46 AM
Hello,

 I've tried your scenario using our latest official binaries (Q2 2011 SP1) however everything worked as expected. You can check the attached project for reference. 

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Gabriel
Top achievements
Rank 1
answered on 15 Nov 2011, 03:29 PM
Thanks Vlad,

based on your solution, I have found that the EnableRowVirtualization="False" was set to the grid and was the cause of this behavior.
0
Kazimierz
Top achievements
Rank 1
answered on 25 Mar 2013, 09:56 PM
Hi Vlad,
I know this topis is quite old, yet still I found a strange behavior in your attached project which also takes place in project I am currently developing. I wanted to add filtering to your grid so in constructor of MainPage just after view initialization I added a filterDescriptor to it. It looks like this:

var view = new VirtualQueryableCollectionView<MyObject>() { LoadSize = 10, PageSize = 10, VirtualItemCount = 1000 };
            view.FilterDescriptors.Add(
                new Telerik.Windows.Data.FilterDescriptor()
                    {
                        Member = Name,
                        MemberType = typeof(string),
                        Value = "4",
                        Operator = FilterOperator.Contains
                    }
                );
            view.ItemsLoading += (s, e) =>
            {
                view.Load(e.StartIndex, from i in Enumerable.Range(e
               
                (....)

Unfortunatelly this little piece of code immediatly throws an "ArgumentOutOfRangeException". This exception also occurs in my current project when I clear FilterDescriptors of VirtualQueryableCollectionView and then try to add a new one (s it is not like here - in my project I can add first filter, problems start when I clear the descriptor collection). Do you know what causes those exceptions?
Tags
GridView
Asked by
Gabriel
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Gabriel
Top achievements
Rank 1
Kazimierz
Top achievements
Rank 1
Share this question
or