This question is locked. New answers and comments are not allowed.
Hi,
I'm looking for a way to get all filtered rows from RadGriwView. I'm using a RadDataPager which pagesize is set to 15. I used the following code, but this one returns me just displayed rows. ie : if there are no filters, it retunrs only 15 rows, while my observablecollection count is about 1200 elements.
Can someone help me please.
ps : I use this code as an extension class.
Thanks.
I'm looking for a way to get all filtered rows from RadGriwView. I'm using a RadDataPager which pagesize is set to 15. I used the following code, but this one returns me just displayed rows. ie : if there are no filters, it retunrs only 15 rows, while my observablecollection count is about 1200 elements.
Can someone help me please.
public static IEnumerable Leaves(this IEnumerable<IGroup> groups) { foreach (IGroup group in groups) { foreach (object item in group.Leaves()) { yield return item; } } } public static IEnumerable Leaves(this IGroup group) { if (group == null) { return Enumerable.Empty<object>(); } if (!group.HasSubgroups) { return group.Items; } return group.Subgroups.Leaves(); } public static IEnumerable FlatItems(this GridViewDataControl grid) { if (grid.IsGrouping) { return grid.Items.Cast<IGroup>().Leaves(); } return grid.Items; }ps : I use this code as an extension class.
Thanks.