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

Hiding a nested grid

Thread ID:





37998 Dec 3,2005 08:15 PM UTC Dec 5,2005 12:34 AM UTC WinForms 4
Tags: GridControl
Alejandro Serrano
Asked On December 3, 2005 08:15 PM UTC

I''m trying to hide a nested grid with no actual rows in the way it was posted in other posts in the forum, but I just get an empty space where nothing is shown (like in the screen capture I''m sending). This is the code I''m using: private void grid_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) { if (e.TableCellIdentity.TableCellType == GridTableCellType.NestedTableCell) { Element cell = e.TableCellIdentity.DisplayElement; Record r = cell.ParentRecord as Record; if (r != null && r.NestedTables.Count > 0 && r.NestedTables[0].ChildTable.GetFilteredRecordCount() == 0) { e.Style.CellType = "Static"; e.Handled = true; } } } Thanks in advance


Administrator [Syncfusion]
Replied On December 4, 2005 12:30 AM UTC

Try this code.
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.GetFilteredRecordCount() == 0)
		e.Style.CellType = "Static";
		e.Style.Borders.Bottom = new GridBorder(this.gridGroupingControl1.TableModel.Options.DefaultGridBorderStyle, SystemColors.GrayText);
Here is a sample. http://www.syncfusion.com/Support/user/uploads/GGC_PasteSort_27ab40b7.zip

Alejandro Serrano
Replied On December 4, 2005 10:36 AM UTC

However, I need that the header and column headers don''t appear. Alltable must be hidden (like in the picture I sent, but without any space or line).

Alejandro Serrano
Replied On December 4, 2005 11:17 AM UTC

OK, I finally got the response. I had a pair of properties that made it impossible to hide them.

Administrator [Syncfusion]
Replied On December 5, 2005 12:34 AM UTC

You can set the row height to be zero, but this takes a custon grouping engine. Here is a little sample. http://www.syncfusion.com/Support/user/uploads/GGC_PasteSort_48414835.zip


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

This page will automatically be redirected to the 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