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

Problem with Records.Count in Filtered event

1 Answer 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 10 Jul 2009, 03:12 PM
Hi,

Above my Grid I'm displaying a count of the number of items displayed. I capture the Filtered event to update this number when the user filters the result set.

When the filter is applied, the Grid.Records.Count property accurately reflects the number of records being displayed. The Filtered event also fires when the user hits 'clear filter' (good!), but the Count property on this occasion remains the filtered number, rather than being the total number of items in the ItemsSource. Interestingly, if I delete the text I've filtered on and click 'Filter', the Records.Count property accurately tells me the total number of items.

To get around this I'm using if (e.AddedDescriptors.Count > 0) to see whether I'm filtering or not, but think the fact that the Grid.Records.Count property isn't consistent should probably be considered a minor bug.

James.

1 Answer, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 10 Jul 2009, 03:18 PM
Hello James,

This is fixed and the fix will be part of our Q2 SP1 (after two weeks).

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
James
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or