VirtualGridSelection
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
Initializes a new instance of the VirtualGridSelection class.
public VirtualGridSelection()
Properties
Gets the index of the current column.
public int CurrentColumnIndex { get; }
Gets the index of the current row.
public int CurrentRowIndex { get; }
Gets the current view info.
public VirtualGridViewInfo CurrentViewInfo { get; }
Gets a value indicating whether there are selected cells.
public bool HasSelection { get; }
Gets the column index of the row where the current selection ends.
public int MaxColumnIndex { get; }
Gets the row index of the row where the current selection ends.
public int MaxRowIndex { get; }
Gets the column index of the row where the current selection starts.
public int MinColumnIndex { get; }
Gets the row index of the row where the current selection starts.
public int MinRowIndex { get; }
Gets or sets a value indicating whether multiple cells can be selected simultaneously.
public bool Multiselect { get; set; }
Gets the current selected region.
public SelectionRegion SelectedRegion { get; }
SelectedRegions
IEnumerable<SelectionRegion>
Gets all selected regions.
public IEnumerable<SelectionRegion> SelectedRegions { get; }
Gets or sets a value indicating how cells are selected.
public VirtualGridSelectionMode SelectionMode { get; set; }
Methods
Adds a new SelectionRegion to the selection.
public void AddSelectedRegions(SelectionRegion selectionRegion)
The selection region to add.
Begins a new selection operation.
public void BeginSelection(int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo, bool keepSelection)
The row index of the cell to begin the selection from.
columnIndexintThe column index of the cell to begin the selection from.
viewInfoVirtualGridViewInfoThe view info of the cell to begin the selection from.
keepSelectionboolDetermines whether old selection should be kept or discarded.
Removes all SelectionRegions.
public void ClearSelectedRegions()
Clears all selected cells.
public void ClearSelection()
Returns a value indicating whther the provided column has selected cells in it.
public bool ColumnContainsSelection(int columnIndex, VirtualGridViewInfo viewInfo)
The column index.
viewInfoVirtualGridViewInfoThe view info of the row.
Returns:Returns a value indicating whether the provided cell is selected.
public bool IsSelected(int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo)
The row index of the cell.
columnIndexintThe column index of the cell.
viewInfoVirtualGridViewInfoThe view info of the cell.
Returns:Fires the event.
protected virtual void OnSelectionChanged()
Fires the event.
protected virtual void OnSelectionChanging(VirtualGridSelectionChangingEventArgs args)
Returns a value indicating whther the provided row has selected cells in it.
public bool RowContainsSelection(int rowIndex, VirtualGridViewInfo viewInfo)
The row index.
viewInfoVirtualGridViewInfoThe view info of the row.
Returns:Selects all cells in the grid.
public void SelectAll()
Events
Occurs after the selection of the grid is changed.
public event EventHandler SelectionChanged
Occurs before the selection of the grid is changed.
public event VirtualGridSelectionChangingEventHandler SelectionChanging