Class
VirtualGridSelection

Represents a class that stores the selection in RadVirtualGrid.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

cs-api-definition
public class VirtualGridSelection

Inheritance: objectVirtualGridSelection

Constructors

VirtualGridSelection()

Initializes a new instance of the VirtualGridSelection class.

Declaration

cs-api-definition
public VirtualGridSelection()

Properties

CurrentColumnIndex

Gets the index of the current column.

Declaration

cs-api-definition
public int CurrentColumnIndex { get; }

Property Value

int

CurrentRowIndex

Gets the index of the current row.

Declaration

cs-api-definition
public int CurrentRowIndex { get; }

Property Value

int

CurrentViewInfo

Gets the current view info.

Declaration

cs-api-definition
public VirtualGridViewInfo CurrentViewInfo { get; }

Property Value

VirtualGridViewInfo

HasSelection

Gets a value indicating whether there are selected cells.

Declaration

cs-api-definition
public bool HasSelection { get; }

Property Value

bool

MaxColumnIndex

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

Declaration

cs-api-definition
public int MaxColumnIndex { get; }

Property Value

int

MaxRowIndex

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

Declaration

cs-api-definition
public int MaxRowIndex { get; }

Property Value

int

MinColumnIndex

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

Declaration

cs-api-definition
public int MinColumnIndex { get; }

Property Value

int

MinRowIndex

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

Declaration

cs-api-definition
public int MinRowIndex { get; }

Property Value

int

Multiselect

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

Declaration

cs-api-definition
public bool Multiselect { get; set; }

Property Value

bool

SelectedRegion

Gets the current selected region.

Declaration

cs-api-definition
public SelectionRegion SelectedRegion { get; }

Property Value

SelectionRegion

SelectedRegions

Gets all selected regions.

Declaration

cs-api-definition
public IEnumerable<SelectionRegion> SelectedRegions { get; }

Property Value

IEnumerable<SelectionRegion>

SelectionMode

Gets or sets a value indicating how cells are selected.

Declaration

cs-api-definition
public VirtualGridSelectionMode SelectionMode { get; set; }

Property Value

VirtualGridSelectionMode

Methods

AddSelectedRegions(SelectionRegion)

Adds a new SelectionRegion to the selection.

Declaration

cs-api-definition
public void AddSelectedRegions(SelectionRegion selectionRegion)

Parameters

selectionRegion

SelectionRegion

The selection region to add.

BeginSelection(int, int, VirtualGridViewInfo, bool)

Begins a new selection operation.

Declaration

cs-api-definition
public void BeginSelection(int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo, bool keepSelection)

Parameters

rowIndex

int

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

columnIndex

int

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

viewInfo

VirtualGridViewInfo

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

keepSelection

bool

Determines whether old selection should be kept or discarded.

ClearSelectedRegions()

Removes all SelectionRegions.

Declaration

cs-api-definition
public void ClearSelectedRegions()

ClearSelection()

Clears all selected cells.

Declaration

cs-api-definition
public void ClearSelection()

ColumnContainsSelection(int, VirtualGridViewInfo)

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

Declaration

cs-api-definition
public bool ColumnContainsSelection(int columnIndex, VirtualGridViewInfo viewInfo)

Parameters

columnIndex

int

The column index.

viewInfo

VirtualGridViewInfo

The view info of the row.

Returns

bool

ExtendCurrentRegion(int, int)

Extends the current selection region to the provided cell.

Declaration

cs-api-definition
public void ExtendCurrentRegion(int rowIndex, int columnIndex)

Parameters

rowIndex

int

The cell row index.

columnIndex

int

The cell column index.

IsSelected(int, int, VirtualGridViewInfo)

Returns a value indicating whether the provided cell is selected.

Declaration

cs-api-definition
public bool IsSelected(int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo)

Parameters

rowIndex

int

The row index of the cell.

columnIndex

int

The column index of the cell.

viewInfo

VirtualGridViewInfo

The view info of the cell.

Returns

bool

OnSelectionChanged()

Fires the event.

Declaration

cs-api-definition
protected virtual void OnSelectionChanged()

OnSelectionChanging(VirtualGridSelectionChangingEventArgs)

Fires the event.

Declaration

cs-api-definition
protected virtual void OnSelectionChanging(VirtualGridSelectionChangingEventArgs args)

Parameters

args

VirtualGridSelectionChangingEventArgs

RowContainsSelection(int, VirtualGridViewInfo)

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

Declaration

cs-api-definition
public bool RowContainsSelection(int rowIndex, VirtualGridViewInfo viewInfo)

Parameters

rowIndex

int

The row index.

viewInfo

VirtualGridViewInfo

The view info of the row.

Returns

bool

SelectAll()

Selects all cells in the grid.

Declaration

cs-api-definition
public void SelectAll()

Events

SelectionChanged

Occurs after the selection of the grid is changed.

Declaration

cs-api-definition
public event EventHandler SelectionChanged

Event Value

EventHandler

SelectionChanging

Occurs before the selection of the grid is changed.

Declaration

cs-api-definition
public event VirtualGridSelectionChangingEventHandler SelectionChanging

Event Value

VirtualGridSelectionChangingEventHandler