Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
920
WebDropDown ValueChanged Eevent does not fire when selecting First Item
posted

Hi,

I have a simple webDropDown with 3 items in the list.  I have included an event handler for wdd_ValueChanged.  In that procedure I have a debug display of the event args e.NewValue, wdd.SelectedValue, wdd.SelectedItemIndex and wdd.SelectedItemCount

PROBLEM 1: When the WDD was originally placed on the page and tested, the SelectedItemCount changed from 1 to 2 after I selected a diferent item from the drop down and the SelectedValue continued to always display the ValueField value from the item that was selected the first time.  This was acting like Enable Multiple Selection flag was set to true, but it was not..

As a test, I set the Enable Multiple Selection flag to true, ran my test and then set it back to false.  After "flipping" this setting, the debug display in the wdd_ValueChanged event behaved correctly.

PROBLEM 2:  As I indicated, there are just 3 items in the simple webDropDown (Clients, Carriers, Licensees).  When the page is initially opened, first item "Clients" is displayed.  The property wdd.SelectedItemIndex is set to 0 in code.  If I select "Carriers", then the wdd_ValueChanged event fires.  If I then select "Licensees", the wdd_ValueChanged event fires again.  Now, if I select "Clients" (the first item in the list), the event wdd_ValueChanged event does not fire.

PROBLEM 3:  This does not seem to be an issue yet, but if I use Quick Watch to look at the properties of the WDD when it is constructed (list items are added in server side code) the property wdd.ValueField has the assignment for the data source column "ID".  But, when I set a breakpoint in the event wdd_ValueChanged and look at the properties for the WDD, the property wdd.ValueField is an empty string.

Thanks - NormD

Parents Reply Children