In this example, only the data cells of the first column of the first split are affected. This is because the column headers and column footers inherit their fonts from the built-in styles Heading and Footing, respectively.
The following code affects data cells only in the first column of the first split:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Dim myfont As Font myfont = New Font (Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.Font, FontStyle.Bold) Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.Font = myfont |
To write code in C#
C# |
Copy Code
|
---|---|
Font myfont; myfont = new Font (this.c1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold); this.c1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font = myfont; |