Back to Devexpress

GridFormatRule.ApplyToRow Property

windowsforms-devexpress-dot-xtragrid-dot-gridformatrule-7d5cdbab.md

latest3.5 KB
Original Source

GridFormatRule.ApplyToRow Property

Gets or sets whether the format is applied to an entire row.

Namespace : DevExpress.XtraGrid

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(false)]
[DXCategory("Behavior")]
[XtraSerializableProperty]
public bool ApplyToRow { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
<DXCategory("Behavior")>
Public Property ApplyToRow As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if the format is applied to the entire row; otherwise, false.

|

Remarks

If a GridFormatRule.Column‘s cell meets the current GridFormatRule object, the format is applied to a single cell of the GridFormatRule.Column or GridFormatRule.ColumnApplyTo column by default. If the ApplyToRow option is enabled, the format is applied to an entire row.

The ApplyToRow property is not in effect for the FormatConditionRuleDataBar and FormatConditionRuleIconSet formats.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ApplyToRow property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-grid-bind-to-business-objects/CS/GridBoundToRuntimeCreatedData/Form1.cs#L44

csharp
gridFormatRule.Rule = formatConditionRuleValue;
gridFormatRule.ApplyToRow = false;
gridView1.FormatRules.Add(gridFormatRule);

winforms-grid-bind-to-business-objects/VB/GridBoundToRuntimeCreatedData/Form1.vb#L46

vb
gridFormatRule.Rule = formatConditionRuleValue
gridFormatRule.ApplyToRow = False
gridView1.FormatRules.Add(gridFormatRule)

See Also

Column

ColumnApplyTo

GridFormatRule Class

GridFormatRule Members

DevExpress.XtraGrid Namespace