views:

30

answers:

1

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.)

+1  A: 

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.

Tim Schmelter
That works fine on first entry as we have Please Select as the first one. Trouble is on editing. "Please Select" is no longer the original selection. Its whatever we previously selected. Switching away fires the event obviously, but switching back (such as u realise u had the correct one all along) fails to fire as .net sees no need to fire the event). I guess it wasn't designed with firing other controls in mind (properly!)
Solyad