hi there,
i have code ,i want the every row under header Admin are checked
private void Form1_Load(object sender, EventArgs e)
{
string[] ug = { "Admin", "User" };
for (int i = 0; i < ug.Length; i++)
{
dgv1.Columns.Add(new DataGridViewCheckBoxColumn());
dgv1.Columns[i].Name = ug[i];
dgv1.Columns[i].HeaderText = ug[i];
dgv1.Columns[i].Width = 100;
if (ug[i] == "Admin")
{
// I want on every row checkbox checked=true here
}
}
}
thank you and best regard
hanafi
How to make checkbox checked=true in datagrisview
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Ryan AlfordRank #1,411 · 1.2K reputationPosted Oct 20, 2008, 11:13 AM EDT
hanafi tanudjaja41 reputationPosted Oct 23, 2008, 3:55 AM EDT
Thank you for the answer
best regard
Hanafi T