[Solved] Get Current Row and it's data in RadVirtualGrid

1 Answer 24 Views
VirtualGrid
Top achievements
Rank 1
Iron
Iron
Iron
asked on 27 Mar 2026, 08:07 AM

1. if i set  MultiSelect = false;     

   after user click

   how can i get current row and it's data

 2. if i set  MultiSelect = true;     

   after user select many rows 

   how can i get these rows and it's data

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 30 Mar 2026, 11:59 AM

Hi,

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:

private void RadVirtualGrid1_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:

I hope this information helps. If you have any other questions, please let me know.

    Regards,
    Nadya | Tech Support Engineer
    Progress Telerik

    Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

    Tags
    VirtualGrid
    Asked by
    Top achievements
    Rank 1
    Iron
    Iron
    Iron
    Answers by
    Nadya | Tech Support Engineer
    Telerik team
    Share this question
    or