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

Stop plus sign appearing for rows with no children

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

3 Replies

AD Administrator Syncfusion Team 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));


AD Administrator Syncfusion Team 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.


AD Administrator Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon