开发者

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 开发者_JS百科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.)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜