I'm using RadGridView and RadDataPager in my wpf project . The problem that when I have to get all items of GridView it return only items of the current page ( that are only 10 rows ) and it should returns all items that exist in all pages.
Example :
list = Gridview.Items.Cast<User>().ToList(); //
Output : I got only 10 elements which are in the first page
My Question is :
How To get all items in GridView ???
NB:
My question is duplicated How to get radlistview items if you use paging , but the OP asked for a solution for Asp.net not for WPF solution.
I have searched for the same property mentioned in the solution , but I didn't find it .
You get them from the
RadDataPageritself.So if you set the
ItemsSourceof yourRadGridViewto aRadDataPagerlike this:You should either get the items from the
Sourceproperty of theRadDataPagercontrol or from the source property (Itemsin this case) that is bound to it: