Skip to main content
A newer version of this page is available. .
All docs
V21.2

VGridControl.IsInComparison(Int32) Method

Indicates whether a specific record is in the comparison collection.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.VerticalGrid

Declaration

public bool IsInComparison(
    int recordIndex
)

Parameters

Name Type Description
recordIndex Int32

The index of the record to be tested.

Returns

Type Description
Boolean

true if the record is in the comparison collection; otherwise, false

Remarks

The VGridControl allows you to compare records if the AllowRecordComparison property is set to true.

The IsInComparison property returns true if a record is in the comparison collection.

To add records to the comparison, use the AddToComparison and AddSelectionToComparison methods.

Example

The following example checks whether the focused record is in the comparison collection:

using DevExpress.XtraVerticalGrid;
private void btnCheckInComparison_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
  bool inComparison = vGridControl1.IsInComparison(vGridControl1.FocusedRecord);
}
See Also