Articles in this section
Category / Section

How to get the filtered records count while adding, deleting or any filtering operations in WinForms GridGroupingControl?

1 min read

Adding and deleting the value from filtered records

To get the filtered records while adding, deleting and filtering the records in the grid, the CategorizedRecords event can be used. In that event, FilteredRecords.Count property can be used to get the filtered records count.

C#

//Event Triggering
this.gridGroupingControl1.Table.CategorizedRecords += Table_CategorizedRecords;
 
//Event Customization
private void Table_CategorizedRecords(object sender, TableEventArgs e)
{
    this.label1.Text= "Filtered Records count :\n" + e.Table.FilteredRecords.Count;
}

 

VB

'Event Triggering
AddHandler Me.gridGroupingControl1.Table.CategorizedRecords, AddressOf Table_CategorizedRecords
 
'Event Customization
Private Sub Table_CategorizedRecords(ByVal sender As Object, ByVal e As TableEventArgs)
    Me.label1.Text = "Filtered Records count :" & e.Table.FilteredRecords.Count
End Sub

 

Screenshot

Add or delete the values from filtered records

Samples:

C#: FilteredRecords_CS

VB: FilteredRecords_VB

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied