Hi All.
I have created a datatable which I use as a datasource for my datagrid.
My code kind of looks like this. I am trying to add the following 3 colums.
1.QuestionId, 2.Question and 3. A column where I can put different kind of
controls, It can be a text box where they can enter a text, Checkbox, a
calander control along with a text box where they can enter date.
Dim dtblTable as datatable
DtTable = New Datatable
Dim dtColQuestionId as New Datacolum ("QuestionId" ,
System.GeType(system.int32))
Dim dtColQuestion as New dataColum ("Question", System.GeType(system.string))
Dim dtColAnswer as New dataColumn("Answer",????????????)
For inti =0 to 5
myrow= New dataRow
myRow(i)("QuestionId) = int
myRow(i)("Question") = "Some Text" & inti ( This is actually sth I pull from
the database, what i agave is just an example)
MyRow(i)("Answer") =???????????????????? (These should hold a control textbox
or checkbox)
Next
If I were using an asp table instead of a datatable and tablerow instead of a
datarow, i can use sth. like this.
mycell.controls.Add(TextBox)
myrow.Cells.Add(mycell)
mytable.Rows.add(myrow)
However I want to use a datatable which i will bind to my datagrid. I am using
on a web form not windows form.
So my problem is
1. How to declare the Answer Column ? What should be the datatype for this
Column ?
2. How to assign the different controls to the rows in the answer column ?
Any help would be highly appreciated.
Thanks
Tegest
---------------------------------
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/