T
tjk
I'm trying to use template columns in a datagrid for controls like checkbox, textbox and drop-down lists. The data I'll load into the datagrid comes from other parts of the ASP form. I load the data into a datatable and bind that to the datagrid using a dataview.
In the code below, I expect to see my static values display in the datagrid when the form loads. Instead I get a datagrid with 2 labels and a textbox but no data. I created the grid with 3 template columns and used the template editor to insert the labels and textbox
Can anyone tell me what I missed
Thanks
tj
Dim dtTable1 = New DataTable
' Add columns to tabl
dtTable1.Columns.Add(New DataColumn("Table", GetType(Label))
dtTable1.Columns.Add(New DataColumn("Column", GetType(Label))
dtTable1.Columns.Add(New DataColumn("Values", GetType(TextBox))
Dim drRow1 As DataRo
drRow1 = dtTable1.NewRo
drRow1(0) = "Customer
drRow1(1) = "State
drRow1(2) = "test
dtTable1.Rows.Add(drRow1
' Create a new dataview and bind it to the datagri
With dgQuer
.Visible = Tru
.DataSource = New DataView(dtTable1
.DataBind(
End Wit
In the code below, I expect to see my static values display in the datagrid when the form loads. Instead I get a datagrid with 2 labels and a textbox but no data. I created the grid with 3 template columns and used the template editor to insert the labels and textbox
Can anyone tell me what I missed
Thanks
tj
Dim dtTable1 = New DataTable
' Add columns to tabl
dtTable1.Columns.Add(New DataColumn("Table", GetType(Label))
dtTable1.Columns.Add(New DataColumn("Column", GetType(Label))
dtTable1.Columns.Add(New DataColumn("Values", GetType(TextBox))
Dim drRow1 As DataRo
drRow1 = dtTable1.NewRo
drRow1(0) = "Customer
drRow1(1) = "State
drRow1(2) = "test
dtTable1.Rows.Add(drRow1
' Create a new dataview and bind it to the datagri
With dgQuer
.Visible = Tru
.DataSource = New DataView(dtTable1
.DataBind(
End Wit