I have a column in the datagrid view which i would like to make the value of the checkbox true. Do you no how to do so ?
xanawa -3 Junior Poster
Recommended Answers
Jump to PostIf you want to set all to true then you can do:
foreach (DataGridViewRow row in dataGridView1.Rows) { DataGridViewCheckBoxCell chk = row.Cells[0] as DataGridViewCheckBoxCell; if (Convert.ToBoolean(chk.Value) == false) chk.Value = true; }
If you want to set for a specific row:
foreach (DataGridViewRow row …
All 2 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.