menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridBordersInfo - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    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
    System.Object
    ShouldSerializeBasedPersisterType
    StyleInfoBase
    StyleInfoSubObjectBase
    GridStyleInfoSubObject
    GridBordersInfo
    Implements
    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    IStyleInfo
    System.ComponentModel.ISupportInitialize
    System.IFormattable
    System.IConvertible
    System.Xml.Serialization.IXmlSerializable
    IStyleInfoSubObject
    Inherited Members
    GridStyleInfoSubObject.GetActiveGridView()
    GridStyleInfoSubObject.GetCellIdentity()
    GridStyleInfoSubObject.GetGridModel()
    GridStyleInfoSubObject.GetGridStyleInfo()
    GridStyleInfoSubObject.Info
    GridStyleInfoSubObject.ToString()
    ShouldSerializeBasedPersisterType.AddNewAttributes(PropertyDescriptor, Attribute[], Int32)
    ShouldSerializeBasedPersisterType.CheckAllProperties
    ShouldSerializeBasedPersisterType.GetCustomPDC(PropertyDescriptorCollection)
    ShouldSerializeBasedPersisterType.GetNewAttributesCount(PropertyDescriptor)
    StyleInfoBase.BeginInit()
    StyleInfoBase.BeginUpdate()
    StyleInfoBase.CacheValues
    StyleInfoBase.Changed
    StyleInfoBase.Changing
    StyleInfoBase.ClearCache()
    StyleInfoBase.CopyFrom(IStyleInfo)
    StyleInfoBase.CreateSubObjectIdentity(StyleInfoProperty)
    StyleInfoBase.Dispose()
    StyleInfoBase.EndInit()
    StyleInfoBase.EndUpdate()
    StyleInfoBase.Equals(Object)
    StyleInfoBase.EqualsObject(Object, Object)
    StyleInfoBase.GetDefaultStyleInfoStore(StyleInfoProperty)
    StyleInfoBase.GetDefaultValue(StyleInfoProperty)
    StyleInfoBase.GetHashCode()
    StyleInfoBase.GetShortValue(StyleInfoProperty)
    StyleInfoBase.GetValue(StyleInfoProperty)
    StyleInfoBase.HasValue(StyleInfoProperty)
    StyleInfoBase.IConvertible.GetTypeCode()
    StyleInfoBase.IConvertible.ToBoolean(IFormatProvider)
    StyleInfoBase.IConvertible.ToByte(IFormatProvider)
    StyleInfoBase.IConvertible.ToChar(IFormatProvider)
    StyleInfoBase.IConvertible.ToDateTime(IFormatProvider)
    StyleInfoBase.IConvertible.ToDecimal(IFormatProvider)
    StyleInfoBase.IConvertible.ToDouble(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt16(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt32(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt64(IFormatProvider)
    StyleInfoBase.IConvertible.ToSByte(IFormatProvider)
    StyleInfoBase.IConvertible.ToSingle(IFormatProvider)
    StyleInfoBase.IConvertible.ToString(IFormatProvider)
    StyleInfoBase.IConvertible.ToType(Type, IFormatProvider)
    StyleInfoBase.IConvertible.ToUInt16(IFormatProvider)
    StyleInfoBase.IConvertible.ToUInt32(IFormatProvider)
    StyleInfoBase.IConvertible.ToUInt64(IFormatProvider)
    StyleInfoBase.Identity
    StyleInfoBase.InheritStyle(IStyleInfo, StyleModifyType)
    StyleInfoBase.IsChanged
    StyleInfoBase.IsEmpty
    StyleInfoBase.IsSubset(IStyleInfo)
    StyleInfoBase.IsValueModified(StyleInfoProperty)
    StyleInfoBase.MergeStyle(IStyleInfo)
    StyleInfoBase.ModifyStyle(IStyleInfo, StyleModifyType)
    StyleInfoBase.OnStyleChanging(StyleInfoProperty)
    StyleInfoBase.ParseString(String)
    StyleInfoBase.ReadXml(XmlReader)
    StyleInfoBase.ResetValue(StyleInfoProperty)
    StyleInfoBase.SetStore(StyleInfoStore)
    StyleInfoBase.SetValue(StyleInfoProperty, Int16)
    StyleInfoBase.SetValue(StyleInfoProperty, Object)
    StyleInfoBase.Store
    StyleInfoBase.ToString(String)
    StyleInfoBase.ToString(String, IFormatProvider)
    StyleInfoBase.Updating
    StyleInfoBase.WeakReferenceChangedListeners
    StyleInfoBase.WriteXml(XmlWriter)
    StyleInfoSubObjectBase.Data
    StyleInfoSubObjectBase.Dispose(Boolean)
    StyleInfoSubObjectBase.IntGetDefaultStyleInfo(StyleInfoProperty)
    StyleInfoSubObjectBase.OnStyleChanged(StyleInfoProperty)
    StyleInfoSubObjectBase.Owner
    StyleInfoSubObjectBase.Sip
    StyleInfoSubObjectBase.SubObjectIdentity
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    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
    StyleInfoBase.GetDefaultStyle()

    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
    StyleInfoSubObjectBase.MakeCopy(StyleInfoBase, StyleInfoProperty)

    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()

    Implements

    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    IStyleInfo
    System.ComponentModel.ISupportInitialize
    System.IFormattable
    System.IConvertible
    System.Xml.Serialization.IXmlSerializable
    IStyleInfoSubObject
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved