FlexGrid for WinForms Task-Based Help > Word Wrapping in a Header or Fixed Row |
To set word wrapping in a header or fixed row, set the Height and WordWrap properties.
In the Designer
Alternatively, the Caption property can also be set using the C1FlexGrid Column Editor.
In Code
Add the following code to the Form_Load event.
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1FlexGrid1.Cols(1).Caption = "Word Wrapping in Header" |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1FlexGrid1.Cols[1].Caption = "Word Wrapping in Header"; |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1FlexGrid1.Rows(0).Height = 3 * Me.C1FlexGrid1.Rows.DefaultSize |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1FlexGrid1.Rows[0].Height = 3 * this.c1FlexGrid1.Rows.DefaultSize; |
In the Designer
In Code
Add the following code to the Form_Load event:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1FlexGrid1.Styles("Fixed").WordWrap = True |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1FlexGrid1.Styles["Fixed"].WordWrap = true; |
In this example, a three-line header is created, and the text is wrapped.