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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DBG/Hierarchical Add col, Button

Thread ID:





17245 Aug 4,2004 12:09 PM UTC Aug 4,2004 03:19 PM UTC WinForms 3
Tags: GridControl
Asked On August 4, 2004 12:09 PM UTC

Could you please show me how to add a button to a lower level (unbound) in a DBG/hier.? The example does it to a first level, which works OK, but I can not untie the calls to get it into lower levels, unbound, added column. Thank you.

Administrator [Syncfusion]
Replied On August 4, 2004 02:01 PM UTC

In your QueryCellInfo where you are providing the value for the unbound column, instead of just checking e.ColIndex, use code like this to get the GridBoundRecordState for the given row. GridBoundRecordState rs = this.grid.Binder.GetRecordStateAtRowIndex(e.RowIndex); Once you have this object, you can check rs.LevelIndex to see what hierarchy level you are on, and then you can set the properties in e.Style accordingly for a particular level.

Replied On August 4, 2004 02:16 PM UTC

I''m using your 3967-1 example code & ExpandGrid. Does "gridDataBoundGrid1.Model.ColWidths[x]" act on the lower level items?

Administrator [Syncfusion]
Replied On August 4, 2004 03:19 PM UTC

Yes, it should work unless there is something else preventing teh sizing from working. In a GridDataBoundGrid hierarchical grid, there really is only one grid, so properties like colwidth affect all levels. One thing that might prevent this from working initially is if you do not set grid.AllowResizeToFit = false. If this is true, the grid tries to autosize things initially, and this can step only any explicit sizing you try to do.


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

Live Chat Icon For mobile
Live Chat Icon