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