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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Showing RecordPlusMinus button for specific row

Thread ID:





72246 Mar 10,2008 08:55 PM UTC Mar 15,2008 04:18 AM UTC WinForms 1
Tags: GridControl
Asked On March 10, 2008 08:55 PM UTC

I want to "simulate" nested tables without actually having table relations. What I need to be able to do is to activate the RecordPlusMinus button for a specific row and then I'll hook onto the RecordExpanding event to perform my "simulated" nested table handling. The following code is where I'm at but it is obviously not working. Any ideas?

private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
GridVisibleColumnDescriptor firstColumn = gridGroupingControl1.TableDescriptor.VisibleColumns[0];
GridColumnDescriptor column = e.TableCellIdentity.Column;
if (column != null && firstColumn != null && column.Name == firstColumn.Name)
Record record = e.TableCellIdentity.DisplayElement.ParentRecord;
if (record != null &&
record.ParentTable.TableDescriptor.Name == _myDataTable.TableName)
e.TableCellIdentity.TableCellType = GridTableCellType.RecordPlusMinusCell;
e.Style.CellType = "NestedTable Row Header";

Administrator [Syncfusion]
Replied On March 15, 2008 04:18 AM UTC

Hi Derrick,

Sorry for the delay in responding.

If your intention is to prevent the Plus/Minus symbol of the Parent table when there is no record in the Child table, it can be achieved by the following code:

protected void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordPlusMinusCell)
Record r = e.TableCellIdentity.DisplayElement.ParentRecord as Record;
if (r != null && r.NestedTables.Count > 0 && r.NestedTables[0].ChildTable.FilteredChildNodeCount == 0)
e.Style.CellType = "Static";

Please refer the below KB link to get more details and sample which illustrates the above:


If I have misunderstood your requirement, could you please explain me in detail, so that I can work in
depth and try to send a better solution?



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.

Please sign in to access our forum

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

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