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.
Unfortunately, activation email could not send to your email. Please try again.

Filter Bar for nested groups.

Thread ID:

Created:

Updated:

Platform:

Replies:

50249 Oct 9,2006 04:45 PM Oct 11,2006 09:15 AM Windows Forms 1
loading
Tags: GridControl
George Thomas
Asked On October 9, 2006 04:45 PM

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;

Administrator [Syncfusion]
Replied On October 11, 2006 09:15 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;