We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add filters from one TreeView node to another TreeView node in WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl


In order to add the Record Filters from one Tree View node to another Tree View node, need to add the same filter condition to each grid in the tree view node.


//Used to save the objects of all grids
List<GridGroupingControl> grids = new List<GridGroupingControl>();
//add the grid to the list
void RecordFilters_Changed(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)
   Syncfusion.Grouping.RecordFilterDescriptorCollection filters =  sender as RecordFilterDescriptorCollection;
   foreach (GridGroupingControl grid in grids)
      foreach(RecordFilterDescriptor filter in filters)
       //To avoid the repeated objects from the list
       if (grid.TableDescriptor.RecordFilters.Contains(filter)) 



'Used to save the objects of all grids
Private grids As New List(Of GridGroupingControl)()
‘add the grid to the list
Private Sub RecordFilters_Changed(ByVal sender As Object, ByVal e As Syncfusion.Collections.ListPropertyChangedEventArgs)
   Dim filters As Syncfusion.Grouping.RecordFilterDescriptorCollection = TryCast(sender, RecordFilterDescriptorCollection)
   For Each grid As GridGroupingControl In grids
      For Each filter As RecordFilterDescriptor In filters
         If grid.TableDescriptor.RecordFilters.Contains(filter) Then
            Continue For
         End If
      Next filter
  Next grid
End Sub



Add filters from one TreeView node to another node


C#: Add RecordFilterd from one TreeView node to another TreeView_CS

VB: Add RecordFilterd from one TreeView node to another TreeView_VB

Reference link: https://help.syncfusion.com/windowsforms/classic/gridgroupingcontrol/filtering

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile