You can't extract the cell value directly from RadVirtualGrid. You can get the row/column index of the selected cell/row and thus extract the required data from the DataSource. See here: Selection Api
1. Getting the Current Row and Its Data with MultiSelect = false
When MultiSelect is set to false, only one cell (and thus one row) is selected at a time. You can use the CurrentCell property to get the current row index. Since RadVirtualGrid is a virtual control, you must use this index to access your actual data source and extract the value from there.
You can handle the CurrentCellChanged event or SelectionChanged to respond when the selection changes:
Example:
privatevoidRadVirtualGrid1_SelectionChanged(object sender, EventArgs e)
{
int rowIndex = this.radVirtualGrid1.CurrentCell.RowIndex;
int colIndex = this.radVirtualGrid1.CurrentCell.ColumnIndex;
RadMessageBox.Show(table.Rows[rowIndex][colIndex].ToString());
}
2. Getting Selected Rows and Their Data with MultiSelect = true
If you enable MultiSelect=true, then you can use the SelectedRegions collection property and extract unique row indexes. Then in a similar way, use these row/column indexes to retrieve their data from your data source.
Basically, the SelectionRegion represents a range specifying the selection. It gives you information about the row/column index by introducing the following properties: - Top - Gets the row index where the selection region starts. - Left - Gets the column index where the selection region starts. - Bottom - Gets the row index where the selection region ends. - Right - Gets the column index where the selection region ends.
For more details, you can refer to the official documentation: