ClassVirtualGridSelection
Represents a class that stores the selection in RadVirtualGrid.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.GridView.dll
Syntax:
public class VirtualGridSelection
Inheritance: objectVirtualGridSelection
Constructors
VirtualGridSelection()
Initializes a new instance of the VirtualGridSelection class.
Declaration
public VirtualGridSelection()
Properties
CurrentColumnIndex
Gets the index of the current column.
CurrentRowIndex
Gets the index of the current row.
CurrentViewInfo
Gets the current view info.
Declaration
public VirtualGridViewInfo CurrentViewInfo { get; }
Property Value
HasSelection
Gets a value indicating whether there are selected cells.
MaxColumnIndex
Gets the column index of the row where the current selection ends.
MaxRowIndex
Gets the row index of the row where the current selection ends.
MinColumnIndex
Gets the column index of the row where the current selection starts.
MinRowIndex
Gets the row index of the row where the current selection starts.
Multiselect
Gets or sets a value indicating whether multiple cells can be selected simultaneously.
SelectedRegion
Gets the current selected region.
Declaration
public SelectionRegion SelectedRegion { get; }
Property Value
SelectedRegions
Gets all selected regions.
Declaration
public IEnumerable<SelectionRegion> SelectedRegions { get; }
Property Value
IEnumerable<SelectionRegion>
SelectionMode
Gets or sets a value indicating how cells are selected.
Declaration
public VirtualGridSelectionMode SelectionMode { get; set; }
Property Value
Methods
AddSelectedRegions(SelectionRegion)
Adds a new SelectionRegion to the selection.
Declaration
public void AddSelectedRegions(SelectionRegion selectionRegion)
Parameters
selectionRegion
The selection region to add.
BeginSelection(int, int, VirtualGridViewInfo, bool)
Begins a new selection operation.
Declaration
public void BeginSelection(int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo, bool keepSelection)
Parameters
rowIndex
The row index of the cell to begin the selection from.
columnIndex
The column index of the cell to begin the selection from.
viewInfo
The view info of the cell to begin the selection from.
keepSelection
Determines whether old selection should be kept or discarded.
ClearSelectedRegions()
Removes all SelectionRegions.
Declaration
public void ClearSelectedRegions()
ClearSelection()
Clears all selected cells.
Declaration
public void ClearSelection()
ColumnContainsSelection(int, VirtualGridViewInfo)
Returns a value indicating whther the provided column has selected cells in it.
Declaration
public bool ColumnContainsSelection(int columnIndex, VirtualGridViewInfo viewInfo)
Parameters
columnIndex
The column index.
viewInfo
The view info of the row.
Returns
ExtendCurrentRegion(int, int)
Extends the current selection region to the provided cell.
IsSelected(int, int, VirtualGridViewInfo)
Returns a value indicating whether the provided cell is selected.
Declaration
public bool IsSelected(int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo)
Parameters
rowIndex
The row index of the cell.
columnIndex
The column index of the cell.
viewInfo
The view info of the cell.
Returns
OnSelectionChanged()
Fires the event.
Declaration
protected virtual void OnSelectionChanged()
OnSelectionChanging(VirtualGridSelectionChangingEventArgs)
Fires the event.
Declaration
protected virtual void OnSelectionChanging(VirtualGridSelectionChangingEventArgs args)
Parameters
args
RowContainsSelection(int, VirtualGridViewInfo)
Returns a value indicating whther the provided row has selected cells in it.
Declaration
public bool RowContainsSelection(int rowIndex, VirtualGridViewInfo viewInfo)
Parameters
rowIndex
The row index.
viewInfo
The view info of the row.
Returns
Events
SelectionChanged
Occurs after the selection of the grid is changed.
SelectionChanging
Occurs before the selection of the grid is changed.
Declaration
public event VirtualGridSelectionChangingEventHandler SelectionChanging
Event Value