Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

devexpress gridView.Rows?

I want to do it with Devexpress extension (gridview) :

string dataInCell = dataGridView1.Rows[i].Cells[j].Value.ToString();

Like :

gridView1.Rows[i].Cells[j]
like image 910
AhmetSem Avatar asked Dec 08 '22 22:12

AhmetSem


2 Answers

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

like image 112
SidAhmed Avatar answered Dec 27 '22 11:12

SidAhmed


try this

 for (int i = 0; i < gridView.RowCount; i++)
        {
            dataInCell = Convert.ToString(gridView.GetRowCellValue(i, "FieldName"));
        }
like image 27
Snippet Avatar answered Dec 27 '22 11:12

Snippet