New to Telerik UI for WinFormsStart a free 30-day trial

Represents a class that stores the selection in RadVirtualGrid.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

C#
public class VirtualGridSelection

Inheritance: objectVirtualGridSelection

Constructors

Initializes a new instance of the VirtualGridSelection class.

C#
public VirtualGridSelection()

Properties

Gets the index of the current column.

C#
public int CurrentColumnIndex { get; }

Gets the index of the current row.

C#
public int CurrentRowIndex { get; }

Gets the current view info.

C#
public VirtualGridViewInfo CurrentViewInfo { get; }

Gets a value indicating whether there are selected cells.

C#
public bool HasSelection { get; }

Gets the column index of the row where the current selection ends.

C#
public int MaxColumnIndex { get; }

Gets the row index of the row where the current selection ends.

C#
public int MaxRowIndex { get; }

Gets the column index of the row where the current selection starts.

C#
public int MinColumnIndex { get; }

Gets the row index of the row where the current selection starts.

C#
public int MinRowIndex { get; }

Gets or sets a value indicating whether multiple cells can be selected simultaneously.

C#
public bool Multiselect { get; set; }

Gets the current selected region.

C#
public SelectionRegion SelectedRegion { get; }

Gets all selected regions.

C#
public IEnumerable<SelectionRegion> SelectedRegions { get; }

Gets or sets a value indicating how cells are selected.

C#
public VirtualGridSelectionMode SelectionMode { get; set; }

Methods

Adds a new SelectionRegion to the selection.

C#
public void AddSelectedRegions(SelectionRegion selectionRegion)
Parameters:selectionRegionSelectionRegion

The selection region to add.

Begins a new selection operation.

C#
public void BeginSelection(int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo, bool keepSelection)
Parameters:rowIndexint

The row index of the cell to begin the selection from.

columnIndexint

The column index of the cell to begin the selection from.

viewInfoVirtualGridViewInfo

The view info of the cell to begin the selection from.

keepSelectionbool

Determines whether old selection should be kept or discarded.

Removes all SelectionRegions.

C#
public void ClearSelectedRegions()

Clears all selected cells.

C#
public void ClearSelection()

Returns a value indicating whther the provided column has selected cells in it.

C#
public bool ColumnContainsSelection(int columnIndex, VirtualGridViewInfo viewInfo)
Parameters:columnIndexint

The column index.

viewInfoVirtualGridViewInfo

The view info of the row.

Returns:

bool

Extends the current selection region to the provided cell.

C#
public void ExtendCurrentRegion(int rowIndex, int columnIndex)
Parameters:rowIndexint

The cell row index.

columnIndexint

The cell column index.

Returns a value indicating whether the provided cell is selected.

C#
public bool IsSelected(int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo)
Parameters:rowIndexint

The row index of the cell.

columnIndexint

The column index of the cell.

viewInfoVirtualGridViewInfo

The view info of the cell.

Returns:

bool

Fires the event.

C#
protected virtual void OnSelectionChanged()

Fires the event.

C#
protected virtual void OnSelectionChanging(VirtualGridSelectionChangingEventArgs args)
Parameters:argsVirtualGridSelectionChangingEventArgs

Returns a value indicating whther the provided row has selected cells in it.

C#
public bool RowContainsSelection(int rowIndex, VirtualGridViewInfo viewInfo)
Parameters:rowIndexint

The row index.

viewInfoVirtualGridViewInfo

The view info of the row.

Returns:

bool

Selects all cells in the grid.

C#
public void SelectAll()

Events

Occurs after the selection of the grid is changed.

C#
public event EventHandler SelectionChanged

Occurs before the selection of the grid is changed.

C#
public event VirtualGridSelectionChangingEventHandler SelectionChanging