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.
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.