I've added a checkbox column to a datagridview in my C# form. The function needs to be dynamic - you select a customer and that brings up all of their items that could be serviced, and you select which of them you wish to be serviced this time around.
Anyway, the code will now add a chckbox to the beginning of the DGV. What I need to know is the following:
1) How do I make it so that the whole column is "checked" by default? 2) How can I make sure I'm only getting values from the "checked" rows when I click on a button just below the DGV?
Here's the code to get the column inserted:
DataGridViewCheckBoxColumn doWork = new DataGridViewCheckBoxColumn();
doWork.HeaderText = "Include Dog";
doWork.FalseValue = "0";
doWork.TrueValue = "1";
dataGridView1.Columns.Insert(0, doWork;
So what next? Any help would be greatly appreciated!