1

I'm trying to get the value of a cell within a selected Row in a RadGridView, I know how to do this for a DataGridView but can't convert the code.

 if (rgv_customers.SelectedCells.Count > 0)
 {
     int selectedrowindex = rgv_customers.SelectedRows.RowIndex;

     DataGridViewRow selectedRow = rgv_customers.Rows[selectedrowindex];
     string comapany = Convert.ToString(selectedRow.Cells["Company"].Value);
}

The above code works for a DataGridView, does anyone know how to convert it for a RadGridView?

benjiiiii
  • 478
  • 10
  • 33
  • [https://www.youtube.com/watch?v=-79EsZ8fPn0](https://www.youtube.com/watch?v=-79EsZ8fPn0) – slow Jun 13 '18 at 13:09

1 Answers1

1

I think your code must work fine!

Can you share some more code, like type of the cell or value in the cell.

If your cell selectedRow.Cells["Company"] is in edit mode than you should use RadGrid.ActiveEditor.Value otherwise your code is perfect!

Jaydeep Karena
  • 159
  • 1
  • 5
  • 14