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.
Public Shared Property FixSubObjectsDerivedFromRowandColStyle As Boolean
Dim value As Boolean
GridStyleInfo.FixSubObjectsDerivedFromRowandColStyle = value
value = GridStyleInfo.FixSubObjectsDerivedFromRowandColStyle
public static bool FixSubObjectsDerivedFromRowandColStyle {get; set;}
Default value is true. You can set it false if you relied on previous fault behavior.
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.

Syncfusion.Grid.Windows: 17.3460.0.26

See Also