I want to do it with Devexpress extension (gridview) :
string dataInCell = dataGridView1.Rows[i].Cells[j].Value.ToString();
Like :
gridView1.Rows[i].Cells[j]
If you are trying to get the value of a cell in a specefic row, here is how :
a. If you want the value of a cell of the focused row :
view.GetFocusedRowCellValue("fieldName");
b. If you want the cell value of a row knowing his handle :
view.GetRowCellValue(rowHandle, "fieldName");
Good luck
try this
for (int i = 0; i < gridView.RowCount; i++)
{
dataInCell = Convert.ToString(gridView.GetRowCellValue(i, "FieldName"));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With