Back to Devexpress

VGridControl.CanUseSelectionForComparison() Method

windowsforms-devexpress-dot-xtraverticalgrid-dot-vgridcontrol-ca6c3e3c.md

latest3.5 KB
Original Source

VGridControl.CanUseSelectionForComparison() Method

Indicates whether you can add or remove the selected records from the comparison.

Namespace : DevExpress.XtraVerticalGrid

Assembly : DevExpress.XtraVerticalGrid.v25.2.dll

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

Declaration

csharp
[EditorBrowsable(EditorBrowsableState.Advanced)]
public bool CanUseSelectionForComparison()
vb
<EditorBrowsable(EditorBrowsableState.Advanced)>
Public Function CanUseSelectionForComparison As Boolean

Returns

TypeDescription
Boolean

true if there is more than one selected record; otherwise, false.

|

Remarks

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

Ensure the CanUseSelectionForComparison method returns true to add (AddSelectionToComparison) or remove (RemoveSelectionFromComparison) the selected records from the comparison.

The CanUseSelectionForComparison returns true if the following conditions are met:

  • The MultiSelect property is enabled.
  • The MultiSelectMode property is set to RecordSelect.
  • There is more than one record selected.

If the CanUseSelectionForComparison method returns true , the Add Selection to Comparison and Remove Selection from Comparison menu items are displayed in the context menu of record headers.

See Also

AllowRecordComparison

RemoveFromComparison(Int32)

AddToComparison(Int32)

AddSelectionToComparison()

ShowComparison()

HideComparison()

ClearComparison()

GetComparisonRecords()

IsInComparison(Int32)

VGridControl Class

VGridControl Members

DevExpress.XtraVerticalGrid Namespace