AD
Administrator
Syncfusion Team
April 20, 2005 09:48 AM UTC
The default behavior is to wrap text that does not fit in the header row. You will have to set the row height larger to see it though.
this.gridControl1[0,3].Text = "Some long Header text";
this.gridControl1.RowHeights[0] = 35;
If you cannot get it to work, can you provide more information on what you are doing (type of grid, maybe a bitmap of teh screen where you want the mutiline header, ???)?
SR
Soumen Roy
June 16, 2005 01:25 PM UTC
Do you have any property to auto set Height of the Row based on number of characters in that cell?
>The default behavior is to wrap text that does not fit in the header row. You will have to set the row height larger to see it though.
>
>this.gridControl1[0,3].Text = "Some long Header text";
>this.gridControl1.RowHeights[0] = 35;
>
>
>If you cannot get it to work, can you provide more information on what you are doing (type of grid, maybe a bitmap of teh screen where you want the mutiline header, ???)?
>
AD
Administrator
Syncfusion Team
June 16, 2005 01:56 PM UTC
If this is an editable cell, and you want the cell to grow as your user types, then you can set the style.AutoSize property for the cell (style.WrapText should also be true).
If you want to auto size it in any other situation (cell not editable, or user not typing, or cell is a header, or ???), then you will have to explicily call
grid.Model.RowHeights.ResizeToFit(GridRangeInfo.Cell(rowIndex, colIndex));
If youare trying to size a header, you should use the overload that lets you set GridResizeToFitOptions.IncludeHeader.
SR
Soumen Roy
June 17, 2005 06:29 PM UTC
Thanks Clay it worked.