This class represents a text font used in a grid cell.
For a list of all members of this type, see OGFont Members.
System.Object
OGFont
An instance of OGFont is available via the TextFont property on a grid Style object. The text font affects the appearance of the text in the grid cell. The following C# code shows how OGFont can be used to set the font for cell 1,1 to bold, underlined, 10pt Arial.
// Create the style, assign the font, and assign back to the grid Style fontStyle = new Style(); fontStyle.TextFont = new OGFont("Arial", 10, 0, true, false, true, false); fontStyle.Value = "Sample"; GridControl1[1, 1].Style = fontStyle; // Directly assign the TextFont property of grid cell 1, 1 GridControl1[1, 1].Style.TextFont = new OGFont("Arial", 10, 0, true, false, true, false); GridControl1[1, 1].Style.Value = "Sample";Note: When creating a font for use in a grid cell style, only properties that are set are specifically applied to the cell's font. Any font properties that are not set are inherited from the table style. The code samples above use the OGFont constructor that sets all properties, causing the exact font to be used in the cell. If only the FaceName and Size are specified, the Orientation, Bold, Italic, UnderLine, and StrikeOut properties are inherited from the Grid's base style.
Namespace: Stingray.Grid
Assemblies: Stingray.GridControl80 (in Stingray.GridControl80.dll)
Stingray.GridControl90 (in Stingray.GridControl90.dll)
Stingray.GridControl10 (in Stingray.GridControl10.dll)