string userName = GetCurrentUser(); string role = GetRole(userName); if(role != "Admin") for (int i = 0; i < dataGridView1.Rows.Count; i++) { if ((dataGridView1.Rows[i].Cells["UserName"].Value != userName)) { dataGridView1.Rows[i].ReadOnly = true; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)