M
Me LK
I need to add a line to choose a size into a dropdown . Since I have
the dropdown nested inside a datagrid this is not working.When a page
displays there are several rows of dropdowns but only the top dropdown
has the option added. The others do not.
I am using the following code
Dim ddlPsize As DropDownList
ddlPsize = (itemInfo.Items(0).FindControl("ddlsizes"))
ddlPsize.Items.Insert(0, "Choose a Size")
I obviously need to loop through the rows of the datagrid but I can
not seem to get it to work. I tried something like this
Dim i As Integer
Dim wRowsCount As Integer = itemInfo.Items.Count
Dim ddlPsize As DropDownList
For i = 0 To wRowsCount - 1
ddlPsize = (itemInfo.Items(0).FindControl("ddlsizes"))
ddlPsize.Items.Insert(0, "Choose a Size")
Next
But it did nothing
Ideas?
Thanks
LK
the dropdown nested inside a datagrid this is not working.When a page
displays there are several rows of dropdowns but only the top dropdown
has the option added. The others do not.
I am using the following code
Dim ddlPsize As DropDownList
ddlPsize = (itemInfo.Items(0).FindControl("ddlsizes"))
ddlPsize.Items.Insert(0, "Choose a Size")
I obviously need to loop through the rows of the datagrid but I can
not seem to get it to work. I tried something like this
Dim i As Integer
Dim wRowsCount As Integer = itemInfo.Items.Count
Dim ddlPsize As DropDownList
For i = 0 To wRowsCount - 1
ddlPsize = (itemInfo.Items(0).FindControl("ddlsizes"))
ddlPsize.Items.Insert(0, "Choose a Size")
Next
But it did nothing
Ideas?
Thanks
LK