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.

Child record count zero

Thread ID:

Created:

Updated:

Platform:

Replies:

71192 Jan 21,2008 03:21 PM Jan 21,2008 10:58 PM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Kathy Gray
Asked On January 21, 2008 03:21 PM

Is there a way to set my Grid Grouping Control, so that if a parent row has zero child records, it will not show the +-?


Rajarajeswari S [Syncfusion]
Replied On January 21, 2008 10:58 PM



Hi Kathy,

Thanks for using Syncfusion products.

When the Child table's record count is zero the Plus/Minus cell type of its Parent table should be set as static to make it disappear. Please refer the below code snippet which illustrates this:

[C#]
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:

http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=311

Please let me know if this helps you out.

Regards,
Raji



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.

;