for (int row = 0; row < grid.GetRowCount(); ++row) grid.GetRow(row).Editable(!readOnly);
Report message to a moderator