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

Header value

Hi, I have a question on the header cell value. I am using Data bound grid and i am adding the column names using m_ListingTable.Columns.Add(new DataColumn(PretestOSDDDefs.OSDDCodeTestID)); to the datatable. Now i want to append some value to the header value. how do i do that. Header cell value = "ID"; New header cell value = "ID(Number)";

5 Replies

AD Administrator Syncfusion Team April 29, 2005 05:48 PM UTC

So you want to change the text that appears in the column header cell? If so, the GridBoundColumn object for the cell has a Header.Text property which you set to specify the Text you want displayed in the column header cell. If you have explicitly added GridBoundColumns, you would get at the GridBoundColumn object using the grid.GridBoundColumns collection. If you have not added GridBoundColumns, then you would access this object using the grid.Binder.InternalColumns collection.


AD Administrator Syncfusion Team May 2, 2005 04:56 AM UTC

Hi, How do i increase the width of the just the header row to accomodate two text one above the above. e.g. If i want to display like below in the column headers. ID Height (Number) (cm) but when am displaying part of the ID and Height is not completely visible. How do i increase the width to accomodate it properly. Pratiksha >So you want to change the text that appears in the column header cell? > >If so, the GridBoundColumn object for the cell has a Header.Text property which you set to specify the Text you want displayed in the column header cell. If you have explicitly added GridBoundColumns, you would get at the GridBoundColumn object using the grid.GridBoundColumns collection. If you have not added GridBoundColumns, then you would access this object using the grid.Binder.InternalColumns collection.


AD Administrator Syncfusion Team May 2, 2005 07:55 AM UTC

To see more than one line, you need to change teh height, correct? (not the width) You change the height of a column header row by setting this property: this.gridGroupingControl1.TableOptions.ColumnHeaderRowHeight You change the width of a column by using this property: this.gridGroupingControl1.TableDescriptor.Columns["ColName"].Width


AD Administrator Syncfusion Team May 2, 2005 08:56 AM UTC

Oops sorry yeah it is height. i could not find this property. Can you tell how do we access this property. I am using DataBoundGridCtrl this.gridGroupingControl1.TableOptions.ColumnHeaderRowHeight >To see more than one line, you need to change teh height, correct? (not the width) > >You change the height of a column header row by setting this property: > >this.gridGroupingControl1.TableOptions.ColumnHeaderRowHeight > >You change the width of a column by using this property: > >this.gridGroupingControl1.TableDescriptor.Columns["ColName"].Width >


AD Administrator Syncfusion Team May 2, 2005 11:12 AM UTC

For some reason, I though you were using a GridGroupingControl. Sorry. To set the RowHeight of the column header row (row 0) in a GridDataBoundGrid, you use: grid.Model.RowHeights[0] = 40;

Loader.
Live Chat Icon For mobile
Up arrow icon