By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,558 Members | 1,673 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,558 IT Pros & Developers. It's quick & easy.

a checkbox in a datagrid

P: n/a
Sam
Hi,
I have a datagrid which the first two columns are set from a dataset
linked to a database. I would like to add manually a third column in
which there would be a checkbox (one per row). This checkbox doesn't
have to be linked to any dataset.
I've seen methods in faqs but I find them a bit of a harssle. I'm sure
there must be a simple way to do that. Does anybody know ?

Thx

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Sam,

A dataset holds not any column at all. It holds tables.
A datagrid holds not any column at all, it shows the columns of tables
(eventually in a dataset).

Therefore you can add too the datatable that has the two other columns a
datatable a column (type system.bool) and your question should be solved.

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
Sam
Thanks it worked :)
If someone is interested :

da.Fill(dsFields)
Dim col As New DataColumn
With col
.ColumnName = "selected"
.DataType = Type.GetType("System.Boolean")
End With
dsFields.Tables(0).Columns.Add(col)

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.