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

Hide child group in GridGrouping

how can i Hide child group when the parent row havn''t child rows.

3 Replies

AD Administrator Syncfusion Team March 1, 2005 08:47 AM

Here is a forumn thread with a sample. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=8517

AY Ayman March 1, 2005 09:09 AM

hi Clay, I was asked how I can hide child group (in GridGrouping not in GridDataBoundGrid ) when the parent haven''t child rows. best regardes.

AD Administrator Syncfusion Team March 1, 2005 10:37 AM

Sorry. You can use the QueryCellStyleInfo event and hide the +/- there.
// Prevent the +/- Icon for an empty row
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordPlusMinusCell)
	Record r = e.TableCellIdentity.DisplayElement.ParentRecord as Record;
	if (r != null && r.ParentTable.TableDescriptor.Name != DataSetBuilder.SALESTRANSACTION_LIST 		
						&& r.NestedTables.Count > 0 && r.NestedTables[0].ChildTable.GetFilteredRecordCount() == 0)
		e.Style.CellType = "Static";

Live Chat Icon For mobile
Up arrow icon