Hi All,
I am able to create dynamic fields inside a data grid (i needed a dropdownbox instead of text when a piece of data has a specific value).
But how can I read the value of a dynamic field???
I created it use this code which works fine:
Dim DLIST As New DropDownList
DLIST.Items.Add("0")
DLIST.Items.Add("25")
DLIST.Items.Add("50")
DLIST.Items.Add("75")
e.Item.Cells(1).Controls.Add(DLIST)
------------------------------------------
When I want to read the value on postback I tried this code but I keep geting a Casting error (cast not valid):
For Each dataGridItem As DataGridItem In DataGrid1.Items
Dim MinValue As String = CType(dataGridItem.Cells(1).Controls(1), DropDownList).SelectedIndex
Next
I am able to create dynamic fields inside a data grid (i needed a dropdownbox instead of text when a piece of data has a specific value).
But how can I read the value of a dynamic field???
I created it use this code which works fine:
Dim DLIST As New DropDownList
DLIST.Items.Add("0")
DLIST.Items.Add("25")
DLIST.Items.Add("50")
DLIST.Items.Add("75")
e.Item.Cells(1).Controls.Add(DLIST)
------------------------------------------
When I want to read the value on postback I tried this code but I keep geting a Casting error (cast not valid):
For Each dataGridItem As DataGridItem In DataGrid1.Items
Dim MinValue As String = CType(dataGridItem.Cells(1).Controls(1), DropDownList).SelectedIndex
Next