Syncfusion.Grid.Windows
Members  Example 


Syncfusion.Windows.Forms.Grid Namespace : GridStyleInfoSubObject Class

GridStyleInfoSubObject Class

GridStyleInfoSubObject is an abstract base class for classes to be used as sub-objects in a GridStyleInfo.
Object Model
GridStyleInfoSubObject ClassStyleInfoIdentityBase ClassStyleInfoBase ClassStyleInfoProperty ClassStyleInfoStore ClassStyleInfoSubObjectIdentity Class
Syntax
'Declaration
 
Public MustInherit Class GridStyleInfoSubObject 
   Inherits Syncfusion.Styles.StyleInfoSubObjectBase
   Implements Syncfusion.Styles.IStyleInfo, Syncfusion.Styles.IStyleInfoSubObject 
'Usage
 
Dim instance As GridStyleInfoSubObject
Remarks
GridStyleInfoSubObject is derived from Syncfusion.Styles.StyleInfoBase and thus provides the same easy way to provide properties that can inherit values from base styles at run-time.

The difference is that GridStyleInfoSubObject supports this inheritance mechanism as a sub-object from a GridStyleInfo. A sub-object needs to have knowledge about its parent object and be able to walk the base styles from the parent object.

Examples for implementation of GridStyleInfoSubObject are the font and border classes in Essential Grid.

Programmers can derive their own style classes from GridStyleInfoSubObject and add type-safe (and intelli-sense) supported custom properties to the style class. If you write your own SpinButton class that needs individual properties, simply add a CellSpinButtonInfo class as subobject. If you derive CellSpinButtonInfo from GridStyleInfoSubObject, your new object will support property inheritance from base styles.

See the overview for Syncfusion.Styles.StyleInfoBase for further discussion about style objects.

Example
The following example shows how you can use the GridFontInfo class in Essential Grid:
standard.Font.Facename = "Helvetica";
model[1, 3].Font.Bold = true;
string faceName = model[1, 3].Font.Facename; // any cell inherits standard style
Console.WriteLIne(faceName); // will output "Helvetica"
Console.WriteLIne(model[1, 3].Font.Bold); // will output "true"
Console.WriteLIne(model[1, 3].Font.HasFaceName); // will output "False"
Inheritance Hierarchy

System.Object
   Syncfusion.Design.ShouldSerializeBasedPersisterType
      Syncfusion.Styles.StyleInfoBase
         Syncfusion.Styles.StyleInfoSubObjectBase
            Syncfusion.Windows.Forms.Grid.GridStyleInfoSubObject
               Syncfusion.GridHelperClasses.ButtonEditInfo
               Syncfusion.GridHelperClasses.FloatNumericUpDownProperties
               Syncfusion.Windows.Forms.Grid.GridBordersInfo
               Syncfusion.Windows.Forms.Grid.GridCellValidateValueInfo
               Syncfusion.Windows.Forms.Grid.GridCheckBoxCellInfo
               Syncfusion.Windows.Forms.Grid.GridFontInfo
               Syncfusion.Windows.Forms.Grid.GridMarginsInfo
               Syncfusion.Windows.Forms.Grid.GridNumericUpDownCellInfo

AssemblyVersion

Syncfusion.Grid.Windows: 17.3460.0.14

See Also