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.

Stop plus sign appearing for rows with no children

Thread ID:





15553 Jun 22,2004 06:56 AM Nov 19,2004 02:37 AM Windows Forms 3
Tags: GridControl
Chris Dugdale
Asked On June 22, 2004 06:56 AM

Hi, I''m using a hierarchical GDBG and adding rows programatically. When a row is added which has no children, how do I stop the plus symbol appearing next to the row by default? Cheers Chris

Administrator [Syncfusion]
Replied On June 22, 2004 08:07 AM

You can remove it by calling grid.ExpandRowAtRowIndex on your new row. DataRow dr = parentTable.NewRow(); parentTable.Rows.Add(dr); int newRowIndex = this.gridDataBoundGrid1.Model.RowCount - 1; this.gridDataBoundGrid1.ExpandAtRowIndex(newRowIndex); this.gridDataBoundGrid1.RefreshRange(GridRangeInfo.Cell(newRowIndex, 1));

Administrator [Syncfusion]
Replied On November 19, 2004 01:59 AM

I''ve got this method to work but it''s less than ideal. Every time the grid is reset, e.g. when sorted, all my rows with children are expanded. To alleviate this I will need to track the expanded state of every row, something the grid should be doing. Has this been improved in SyncFusion 3.0? I''ve read the release notes and couldn''t see anything. Thanks, Ben.

Administrator [Syncfusion]
Replied On November 19, 2004 02:37 AM

No, this behavior is the same in 3.0. The GridGroupingControl will persist expands through a sort. For a GridDataBoundGrid, as you said, you would have to handle this yourself. Here is a forum thread discussing how you can do it with a sample. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16065


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.