int PID = 0;
private void dgrid_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (dgrid.Rows.Count >= 0)
{
if (e.RowIndex >= 0)
{
PID = Convert.ToInt32(dgrid.Rows[e.RowIndex].Cells["PID"].Value.ToString());
}
}
}
this way u can fetch the cell values..
if u want to update cell value to Database
use CellValueChanged Event..