i have a datagridview with some rows that have edit and delete buttons,if user click on the edit button then i want to disable all the edit and delete buttons of all rows, i use ReadOnly properties in 2 ways but it doesn't help and the buttons are still clickable, there is my code, can anyone help? tnx.
foreach(DataGridViewRow row in grdWorkDayTime.Rows)
{
DataGridViewButtonCell btncell = (DataGridViewButtonCell)row.Cells[4]; //Cells[4] is edit button
btncell.ReadOnly = true;
row.Cells[5].ReadOnly = true; //Cells[5] is delete button
}