windowsforms-devexpress-dot-xtragrid-dot-gridformatrule-2532b2b5.md
Gets or sets a column that provides values to test against the current format rule. By default, the format is applied to this column.
Namespace : DevExpress.XtraGrid
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DefaultValue(null)]
[DXCategory("Behavior")]
public GridColumn Column { get; set; }
<DefaultValue(Nothing)>
<DXCategory("Behavior")>
Public Property Column As GridColumn
| Type | Default | Description |
|---|---|---|
| GridColumn | null |
The column that provides values to test against the current formatting rule.
|
By default, if a cell in the Column meets the current GridFormatRule object, the format is applied to this cell. However, you can choose another target column using the GridFormatRule.ColumnApplyTo property.
In addition, the format can be applied to the entire row. To accomplish this, set the GridFormatRule.ApplyToRow property to true.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Column 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#L39
FormatConditionRuleValue formatConditionRuleValue = new FormatConditionRuleValue();
gridFormatRule.Column = gridView1.Columns["RequiredDate"];
formatConditionRuleValue.PredefinedName = "Red Bold Text";
winforms-grid-bind-to-business-objects/VB/GridBoundToRuntimeCreatedData/Form1.vb#L41
Dim formatConditionRuleValue As New FormatConditionRuleValue()
gridFormatRule.Column = gridView1.Columns("RequiredDate")
formatConditionRuleValue.PredefinedName = "Red Bold Text"
See Also