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

Problem with RadDataPager, RadGridview, PagedCollectionView and filters

3 Answers 96 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Leonard
Top achievements
Rank 1
Leonard asked on 31 Aug 2015, 01:34 PM

Good morning,

I have some problems with this combination,

The RadGridView has filtering. The itemsource of RadGridView and RadDataPager is a PagedCollectionView list.

When no filter is applied I get X pages, and I see ​20 items on Page 1. When I apply a certain filter in the RadGridView, I now see 5 items on Page 1, and the RadDataPager still tells me there are X pages. In addition, per page, I'm see seeing only the filters of current page and not all collection.

It doesn't happen when the collection is a ObservableCollection for example.I have some problems with this combination,

The RadGridView have enable the filtering.

The itemsource of RadGridView and RadDataPager is a PagedCollectionView list.

When no filter is applied I get X pages, and I see ​20 items on Page 1. When I apply a certain filter in the RadGridView, I now see 5 items on Page 1, and the RadDataPager still tells me there are X pages. In addition, per page, I'm see seeing only the filters and not all collection of filter.

It doesn't happen when the collection is a ObservableCollection for example.

 

3 Answers, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 03 Sep 2015, 01:14 PM
Hello Leonard,

Internally, RadGridView uses a queryable collection as the data operations are implemented through LINQ. Regardless of the type of collection you pass to the control, if it doesn't already implement IQuaryable, it will be wrapped internally.

In a gist, when using PagedCollectionView, the filtering is applied after the paging of the collection, imagine it working with the subset of data on the current page. In the case of ObservableCollection, the logic that translates it to a QuaryableCollectionView will first filter the data, and then page it, hence the difference in the result. The behavior is simply an implementation detail of the control.

I hope this makes things clear.

Regards,
Petya
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Leonard
Top achievements
Rank 1
answered on 03 Sep 2015, 02:58 PM

Hi Peyia and thanks for your answer.

I'm still wondering, Is there a way to get the desired behavior using RadGridView with PagedCollectionView and Filters?

 

0
Petya
Telerik team
answered on 08 Sep 2015, 12:02 PM
Hi Leonard,

It is possible to change the filtering control, so you might be able to show all distinct values in it, but the filtering itself will still work with the items of the current page only. I'm afraid I cannot suggest anything that will make this work as desired.

Regards,
Petya
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
DataPager
Asked by
Leonard
Top achievements
Rank 1
Answers by
Petya
Telerik team
Leonard
Top achievements
Rank 1
Share this question
or