Class DataGridStyleInfoSubObject
DataGridStyleInfoSubObject is an abstract base class for classes to be used as sub-objects in a CellStyleInfo.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.WinForms.DataGrid.Styles
Assembly: Syncfusion.SfDataGrid.WinForms.dll
Syntax
public abstract class DataGridStyleInfoSubObject : StyleInfoSubObjectBase, ICustomTypeDescriptor, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject
Remarks
DataGridStyleInfoSubObject is derived from 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 DataGridStyleInfoSubObject supports this inheritance mechanism as a sub-object from a CellStyleInfo. 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 DataGridStyleInfoSubObject are the font and border classes in Essential Grid.
Programmers can derive their own style classes from DataGridStyleInfoSubObject and add type-safe supported custom properties to the style class. If you write your own SpinButton class that needs individual properties, simply add a CellSpinButtonInfo class as sub object. If you derive CellSpinButtonInfo from DataGridStyleInfoSubObject, your new object will support property inheritance from base styles.
See the overview for StyleInfoBase for further discussion about style objects.
Constructors
DataGridStyleInfoSubObject(StyleInfoStore)
Initializes a new instance of the DataGridStyleInfoSubObject class.
Declaration
public DataGridStyleInfoSubObject(StyleInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoStore | store | A StyleInfoStore that holds data for this object. All changes in this style object will be saved in the StyleInfoStore object. |
DataGridStyleInfoSubObject(StyleInfoSubObjectIdentity, StyleInfoStore)
Initializes a new instance of the DataGridStyleInfoSubObject class.
Declaration
public DataGridStyleInfoSubObject(StyleInfoSubObjectIdentity identity, StyleInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A StyleInfoSubObjectIdentity that holds the identity for this StyleInfoBase. All changes in this style object will saved in the StyleInfoStore object. |
StyleInfoStore | store | A StyleInfoStore that holds data for this object . |
Properties
Info
Gets results of ToString method.
Declaration
public string Info { get; }
Property Value
Type |
---|
System.String |
Methods
GetCellStyleInfo()
Gets the CellStyleInfo this sub object belongs to.
Declaration
public CellStyleInfo GetCellStyleInfo()
Returns
Type | Description |
---|---|
CellStyleInfo | The parent style object. |
ToString()
Returns a string holding the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String representation of the current object. |