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
close icon

Filter Bar for nested groups.

I have 3 tables that are nested. I can set the filter bar for the topmost table but how to do it for the nested tables. Thanks. George.

See the code below:
// set the region table to grid''s datasource
this.gridGroupingControl1.DataSource = regionTable;
// filter bar on the region
this.gridGroupingControl1.TableDescriptor.Columns["region"].AllowFilter = true;
this.gridGroupingControl1.TopLevelGroupOptions.ShowFilterBar = true;

// setting column styles

GridEngine engine = this.gridGroupingControl1.Engine;
GridTableDescriptor parentTD = (GridTableDescriptor) engine.TableDescriptor;
parentTD.Columns["region"].Appearance.AnyRecordFieldCell.BackColor = Color.LightBlue;
parentTD.Columns["region"].Width = 110;
parentTD.VisibleColumns.Remove ("this");
parentTD.AllowRemove = false;
parentTD.AllowEdit = false;
parentTD.AllowNew = false;

RelationDescriptor childRD = parentTD.Relations["Customers"];
GridTableDescriptor childTD = (GridTableDescriptor) childRD.ChildTableDescriptor;
childTD.VisibleColumns.Remove ("this");
childTD.Columns["customer_name"].Appearance.AnyRecordFieldCell.BackColor = Color.Pink;
this.gridGroupingControl1.ChildGroupOptions.ShowFilterBar = true;
childTD.Columns ["customer_name"].AllowFilter = true;
childTD.AllowRemove = false;
childTD.AllowEdit = false;
childTD.AllowNew = false;

RelationDescriptor grandChildRD = childTD.Relations["Crews"];
GridTableDescriptor grandChildTD = (GridTableDescriptor) grandChildRD.ChildTableDescriptor;
grandChildTD.Columns ["STATUS"].Appearance.AnyRecordFieldCell.BackColor = Color.LightCoral;
grandChildTD.VisibleColumns.Remove ("this");
grandChildTD.AllowRemove = false;
grandChildTD.AllowEdit = false;
grandChildTD.AllowNew = false;

1 Reply

AD Administrator Syncfusion Team October 11, 2006 01:15 PM UTC

Hi George,

Please refer to the below forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=50252

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon