PC Review


Reply
Thread Tools Rate Thread

a checkbox in a datagrid

 
 
Sam
Guest
Posts: n/a
 
      30th Mar 2005
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

 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      30th Mar 2005
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


 
Reply With Quote
 
Sam
Guest
Posts: n/a
 
      31st Mar 2005
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)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid and embeded Checkbox..How to find if checkbox clicked =?Utf-8?B?RG90TmV0RGV2?= Microsoft ASP .NET 1 6th Oct 2006 05:11 PM
How add Checkbox to datagrid Harsh Trivedi Microsoft Dot NET Compact Framework 0 18th Jul 2005 06:17 AM
DataGrid: Add Checkbox Frank Esser Microsoft ASP .NET 1 11th Mar 2005 02:31 PM
Master-Detail Datagrid -checkbox (once tick the checkbox, all the child checkbox is ticked) Agnes Microsoft VB .NET 0 16th Aug 2004 11:23 AM
Added CheckBox to a DataGrid Doesn't work with DataGrid.Enabled=False Amar Microsoft ASP .NET 0 6th Apr 2004 11:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:07 PM.