E
eguworks
Hay,
I think there's a slight bug when it comes to setting the selectedvalue
of serveral *dynamicly filled* listboxes.
Its like this:
Have a page with 5 dropdownlist boxes
fill them with 5 items as displayed below
Dim i As Integer = 0
For i = 1 To 5
Dim li As New ListItem
li.Text = i
li.Value = i
DropDownList1.Items.Add(li)
DropDownList2.Items.Add(li)
DropDownList3.Items.Add(li)
DropDownList4.Items.Add(li)
DropDownList5.Items.Add(li)
Next
After that, I want to have each of them select a different item, code
DropDownList1.SelectedValue = "1"
DropDownList2.SelectedValue = "2"
DropDownList3.SelectedValue = "3"
DropDownList4.SelectedValue = "4"
DropDownList5.SelectedValue = "5"
What really happens in this case, when it sets
DropDownList1.SelectedValue to "1", it sets ALL dropdownlists to "1",
same for "2", "3" etc.
It constantly sets all dropdownlists instead of just one
This doesnt happen when the dropdownlist is hard filled.
I can probably think of some javascript workaround, but this is still a
bit odd behaviour.
I think there's a slight bug when it comes to setting the selectedvalue
of serveral *dynamicly filled* listboxes.
Its like this:
Have a page with 5 dropdownlist boxes
fill them with 5 items as displayed below
Dim i As Integer = 0
For i = 1 To 5
Dim li As New ListItem
li.Text = i
li.Value = i
DropDownList1.Items.Add(li)
DropDownList2.Items.Add(li)
DropDownList3.Items.Add(li)
DropDownList4.Items.Add(li)
DropDownList5.Items.Add(li)
Next
After that, I want to have each of them select a different item, code
DropDownList1.SelectedValue = "1"
DropDownList2.SelectedValue = "2"
DropDownList3.SelectedValue = "3"
DropDownList4.SelectedValue = "4"
DropDownList5.SelectedValue = "5"
What really happens in this case, when it sets
DropDownList1.SelectedValue to "1", it sets ALL dropdownlists to "1",
same for "2", "3" etc.
It constantly sets all dropdownlists instead of just one
This doesnt happen when the dropdownlist is hard filled.
I can probably think of some javascript workaround, but this is still a
bit odd behaviour.