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.

Column width for multiple header rows

Thread ID:

Created:

Updated:

Platform:

Replies:

2673 Feb 7,2003 10:26 AM Feb 7,2003 12:51 PM Windows Forms 2
loading
Tags: GridControl
Curtis Koppang
Asked On February 7, 2003 10:26 AM

How do I explicitly set the column width for a grid with mulitple column rows. If I use the grid.Model.ColWidths it does not change. Tx, curt

Soung Bae
Replied On February 7, 2003 11:14 AM

If this is a data bound grid try: grid.Model.Cols.Size[col] = 200; > How do I explicitly set the column width for a grid with mulitple column rows. > > If I use the grid.Model.ColWidths it does not change. > > Tx, > curt

Administrator [Syncfusion]
Replied On February 7, 2003 12:51 PM

grid.Model.ColWidths should work. You just have to be aware that the row header in the second and third rows are sharing the same columns as the first row. Also, getting the column index that is associated with a field number within the table is a bit more complicate. The column index that is associated with a that fieldNum needs to be determined with code as follows GridBoundRecordState state = Binder.GetRecordStateAtRowIndex(rowIndex); GridHierarchyLevel ghl = Binder.levels[state.level] as GridHierarchyLevel; int rowFieldNum = ghl.RowFieldToField(state.row, fieldNum); int colIndex = this.binder.FieldToColIndex(rowFieldNum); Now you can change the column width for the specified field. We will try to make such things easier in future versions ... Stefan

CONFIRMATION

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.

;