Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

VGridControl.CanUseSelectionForComparison() Method

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

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v24.2.dll

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

#Declaration

[EditorBrowsable(EditorBrowsableState.Advanced)]
public bool CanUseSelectionForComparison()

#Returns

Type Description
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