Solyad
Solyad

Reputation: 250

DropDownList selectindexchanged doesnt fire when reselecting original selected value

I have a form in which I have two drop downs. A decision in one fires the other.

The basic rule is:

Drop Down A -> select items 1,2 or 3. Drop down B loads list 1 Drop Down A -> select items 4,5 or 6. Drop down B loads list 2

This works fine on first load and save of the form. The problem is when I edit. Lets say I selected and saved item 3 in Drop Down A.

On Editing:

If I change Drop Down A, the select changed event fires every time I change it except when i reselect what was saved. It leaves me in a situation where I can choose 3 in Drop Down A but are left with the wrong list in Drop Down B as the event doesn't refire on that selection.

I've tried every trick I can think of but I can't seem to get around this issue.

Anyone have any suggestions?

(We've tried radiobutton lists and its the same issue. Setting the value in a variable and attempting to reset the control to clear what it thinks the original value is doesn't work either.)

Upvotes: 1

Views: 613

Answers (1)

Tim Schmelter
Tim Schmelter

Reputation: 460108

Not sure that i've understood your problem completely, but consider to add an extra blank or dummy item(-- please select --) to your list and have that be the default selected item. That way as soon as a user selects a valid item it will always have changed from the original item.

Upvotes: 1

Related Questions