New to Telerik UI for WinForms? Download free 30-day trial

Selecting Cells Programmatically

Single Cell Select

You can use the following method to select a cell in the code:

this.radVirtualGrid1.SelectCell(5, 2);

Me.radVirtualGrid1.SelectCell(5, 2)

Multiple Cells Select

You can select multiple cells with code as well. This can be achieved by using the BeginSelection and ExtendCurrentRegion methods. For example:

radVirtualGrid1.VirtualGridElement.Selection.BeginSelection(3, 1, radVirtualGrid1.MasterViewInfo, true);
radVirtualGrid1.VirtualGridElement.Selection.ExtendCurrentRegion(6, 3);

radVirtualGrid1.VirtualGridElement.Selection.BeginSelection(3, 1, radVirtualGrid1.MasterViewInfo, True)
radVirtualGrid1.VirtualGridElement.Selection.ExtendCurrentRegion(6, 3)

See Also

In this article