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

Lazy load subgroups when GroupBy

3 Answers 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Praveen
Top achievements
Rank 1
Praveen asked on 11 Sep 2018, 01:06 PM

Hi,

Looks like, using the VirtualQueryableCollectionView, it is possible to lazy load the data if it is flat, but it is not possible if the data is displayed hierarchically. That is, using VirtualQueryableCollectionView, if GroupBy is done for single\multiple columns, the grouping is done only of the initial few records, obviously, as only few records are loaded initially by the VirtualQueryableCollectionView.

If there are multiple groupings then there is a hierarchy, and one can drill down subgroups step by step. I wanted to know if there is a way with GridView to lazily load the subgroup items.

Any suggestions will be helpful.

thanks

3 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 13 Sep 2018, 02:27 PM
Hello Praveen,

I am afraid that, if you need to allow grouping of your data, you will need to go with another type of collection as grouping is not supported when using the VirtualQueryableCollectionView since grouping implies that all the data should be loaded beforehand, which breaks the conception of this mechanism. 

Instead, you can use the QueryableCollectionView class and provide an IQueryable as its source collection so that all operations will be executed directly on the server using the query provider.

I hope that using the QueryableCollectionView would work for you.

Regards,
Vladimir Stoyanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Praveen
Top achievements
Rank 1
answered on 17 Sep 2018, 01:05 PM

Hi Vladimir,

I have used the IQueryable as

var dataView = new QueryableCollectionView(dataRows.AsQueryable().ToIList());
grid.ItemsSource = dataView;

where dataRows is "IEnumerable<DataRow>".

I am able to somehow perform sorting\filtering using VirtualQueryableCollectionView, but grouping seems difficult.  

Is there a way with Telerik grids and classes to do groupings and perform lazy loading of grouped items?

thanks,

Bhushan

0
Vladimir Stoyanov
Telerik team
answered on 19 Sep 2018, 03:51 PM
Hello Praveen,

I am afraid that lazy loading of grouped items is not possible. To reiterate, in order for the data to be grouped, it needs to be fetched first. This would be the case for QueryableCollectionView as well as for the VirtualQueryableCollectionView which does not support grouping altogether.

I hope that this clarifies things. If you have any additional questions or concerns, please let me know.

Regards,
Vladimir Stoyanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Praveen
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Praveen
Top achievements
Rank 1
Share this question
or