| How to Use Styles > Working with Style Properties > Anonymous Style Inheritance > Example 2 of 10: Affecting Only Data Cells in the First Split |
In this example, only the data cells of the first split are affected. This is because the split caption, column headers, and column footers inherit their fonts from the built-in styles Caption, Heading, and Footing, respectively.
The following code affects data cells only in the first split:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Dim myfont As Font myfont = New Font (Me.C1TrueDBGrid1.Splits(0).Style.Font, FontStyle.Bold) Me.C1TrueDBGrid1.Splits(0).Style.Font = myfont |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
Font myfont; myfont = new Font (this.c1TrueDBGrid1.Splits[0].Style.Font, FontStyle.Bold); this.c1TrueDBGrid1.Splits[0].Style.Font = myfont; |
|