Class GridBordersInfo
Defines the class that provides a GridStyleInfoSubObject object for borders in a cell. Each border side of the cell can be configured individually with a GridBorder value. Border sides that have not been initialized will inherit default values from a base style.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridBordersInfo : GridStyleInfoSubObject, ICustomTypeDescriptor, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject
Examples
The following code changes border information for cells:
GridBorder border = new GridBorder(GridBorderStyle.Solid, Color.FromArgb(57, 73, 122));
model[rowIndex, colIndex].Borders.Bottom = border;
model[rowIndex, colIndex].Borders.Right = border;
The following code hides grid lines for specific cells:
GridBorder border = new GridBorder(GridBorderStyle.None);
model[rowIndex, colIndex].Borders.Bottom = border;
model[rowIndex, colIndex].Borders.Right = border;
Constructors
GridBordersInfo()
Initializes a new instance of the GridBordersInfo class.
Declaration
public GridBordersInfo()
GridBordersInfo(StyleInfoSubObjectIdentity)
Initializes a new instance of the GridBordersInfo class and associates it with an existing GridStyleInfoSubObjectIdentity instances.
Declaration
public GridBordersInfo(StyleInfoSubObjectIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A GridStyleInfoSubObjectIdentity that holds the identity for this GridBordersInfo. |
GridBordersInfo(StyleInfoSubObjectIdentity, GridBordersInfoStore)
Initializes a new instances of the GridBordersInfo class and associates it with an existing GridStyleInfoSubObjectIdentity and GridBordersInfoStore
Declaration
public GridBordersInfo(StyleInfoSubObjectIdentity identity, GridBordersInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A GridStyleInfoSubObjectIdentity that holds the identity for this GridBordersInfo |
GridBordersInfoStore | store | A GridBordersInfoStore that holds data for this GridBordersInfo. All changes in this style object will saved in the GridBordersInfoStore object. |
Properties
All
Sets all four border sides with one command.
Declaration
public GridBorder All { set; }
Property Value
Type |
---|
GridBorder |
Examples
model[2, 2].Borders.All = new GridBorder(GridBorderStyle.Solid, Color.FromArgb(100, 238, 122, 3));
Bottom
Gets or sets the value of bottom border.
Declaration
public GridBorder Bottom { get; set; }
Property Value
Type |
---|
GridBorder |
Default
Gets the default value of the GridBordersInfo to be used with a default style.
Declaration
public static GridBordersInfo Default { get; }
Property Value
Type |
---|
GridBordersInfo |
Remarks
The Default of the GridStyleInfo class will return the default border info that this method generates through its overridden version of GetDefaultStyle().
HasBottom
Gets a value indicating whether the bottom border has been initialized.
Declaration
public bool HasBottom { get; }
Property Value
Type |
---|
System.Boolean |
HasLeft
Gets a value indicating whether the left border has been initialized.
Declaration
public bool HasLeft { get; }
Property Value
Type |
---|
System.Boolean |
HasRight
Gets a value indicating whether the right border has been initialized.
Declaration
public bool HasRight { get; }
Property Value
Type |
---|
System.Boolean |
HasTop
Gets a value indicating whether the top border has been initialized.
Declaration
public bool HasTop { get; }
Property Value
Type |
---|
System.Boolean |
Item[GridBorderSide]
Gets or sets the value of the GridBorder for the specified GridBorderSide
Declaration
public GridBorder this[GridBorderSide side] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
GridBorderSide | side | Holds the identity of GridBorderSide |
Property Value
Type |
---|
GridBorder |
Left
Gets or sets the value of left border.
Declaration
public GridBorder Left { get; set; }
Property Value
Type |
---|
GridBorder |
Right
Gets or sets the value of right border.
Declaration
public GridBorder Right { get; set; }
Property Value
Type |
---|
GridBorder |
Top
Gets or sets the value of top border.
Declaration
public GridBorder Top { get; set; }
Property Value
Type |
---|
GridBorder |
Methods
GetDefaultStyle()
Overrides and returns the Default
Declaration
protected override StyleInfoBase GetDefaultStyle()
Returns
Type | Description |
---|---|
StyleInfoBase | A GridBordersInfo object with default values. |
Overrides
MakeCopy(StyleInfoBase, StyleInfoProperty)
Makes an exact copy of the current object.
Declaration
public override IStyleInfoSubObject MakeCopy(StyleInfoBase newOwner, StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoBase | newOwner | The new owner style object for the copied object. |
StyleInfoProperty | sip | The identifier for this object. |
Returns
Type | Description |
---|---|
IStyleInfoSubObject | The copy of the current object. |
Overrides
ResetAll()
Resets all four border sides with one command.
Declaration
public void ResetAll()
ResetBottom()
Resets the bottom border.
Declaration
public void ResetBottom()
ResetLeft()
Resets the left border.
Declaration
public void ResetLeft()
ResetRight()
Resets the right border.
Declaration
public void ResetRight()
ResetTop()
Resets the top border.
Declaration
public void ResetTop()