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

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 01:47 PM UTC

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

AY Ayman March 1, 2005 02:09 PM UTC

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 03:37 PM UTC

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