I want to add checkbox for each record in datagrid on windows form with c# vs 2003. Please any help can solve my problem. Howdo do this.

Recommended Answers

All 4 Replies

As long as the field is boolean, you can assign it by clicking the little arrow and changing the field type to checkbox

CheckBox box = new CheckBox();
dataGrid1.Controls.Add(box);

Or u can use datagridview control which has column properties

DataGridViewCheckBoxColumn box = new DataGridViewCheckBoxColumn();
            dataGridView1.Columns.Add(box);

Which is what I suggested but using the UI

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.