Syncfusion.Grid.Windows
Example 


Syncfusion.Windows.Forms.Grid Namespace > GridStyleInfo Class : FixSubObjectsDerivedFromRowandColStyle Property

FixSubObjectsDerivedFromRowandColStyle Property

Gets or sets a value indicating whether the cells are derived from row and column styles. In the case that the base style that implements a specific sub-object (e.g. Borders, Font, ...) is a row style the column style would be ignored if we return here the sub-object row of the row style in the optimized ReadOnlyBorders property. Returning the normal Borders objects instead fixes this problem.
Syntax
'Declaration
 
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>
<BrowsableAttribute(False)>
<XmlIgnoreAttribute()>
Public Shared Property FixSubObjectsDerivedFromRowandColStyle As Boolean
'Usage
 
Dim value As Boolean
 
GridStyleInfo.FixSubObjectsDerivedFromRowandColStyle = value
 
value = GridStyleInfo.FixSubObjectsDerivedFromRowandColStyle
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Browsable(false)]
[XmlIgnore()]
public static bool FixSubObjectsDerivedFromRowandColStyle {get; set;}
Remarks
Default value is true. You can set it false if you relied on previous fault behavior.
Example
This example shows how to use the FixSubObjectsDerivedFromRowandColStyle property.
this.gridControl1.Model.RowStyles[row - 1].Borders.Bottom = new GridBorder(GridBorderStyle.Solid, c, GridBorderWeight.ExtraExtraThick);
this.gridControl1.Model.ColStyles[col - 1].Borders.Right = new GridBorder(GridBorderStyle.Solid, c, GridBorderWeight.ExtraExtraThick);
GridBordersInfo b = this.gridControl1.Model[row - 1, col - 1].ReadOnlyBorders;
Console.WriteLine(b.Right); // will return Default since ReadOnlyBorders is RowStyles[row - 1].Borders which
has no knowledge about ColStyles if FixSubObjectsDerivedFromRowandColStyle = false.
 
Setting FixSubObjectsDerivedFromRowandColStyle = true fixes the problem.
AssemblyVersion

Syncfusion.Grid.Windows: 17.3460.0.26

See Also