c# - How to get value cell by name in click event? -
i have got datagridview click event inside try value of cell selected row:
private void datagridview1_cellclick(object sender, datagridviewcelleventargs e) { string status = datagridview1.rows[e.rowindex].cells[e.columnindex].value.tostring(); }
it works, how can value name column this:
string status = datagridview1.rows[e.rowindex].cells["status"].value.tostring();
i have column name status
, ut says me there not column
Comments
Post a Comment