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
885
When selecting first item on dropdown --> selectionChanged event doesn't fire.
posted

After initializing my dropdown and setting the selectedItemIndex to -1, I would have thought when selecting the first item in the dropdown (with index of 0), it would trigger the selectionChanged event. This doesn't appear to be happening. I have confirmed the dropdown activeitemindex and selecteditemindex are set to -1, but the event doesn't get fired until you have selected any other item except the first item in the list.

Idea's/thoughts/solutions?

Paul

Parents
  • 10685
    Offline posted

    Hello,

    Thank you for posting in our community.

    Please make sure you have enabled both  AutoPostBackFlags for SelectionChanged as well as specifying the event handler. For example:   

    OnSelectionChanged="WebDropDown1_SelectionChanged">
    <AutoPostBackFlags SelectionChanged="On" />

    I am attaching a runnable code sample to my reply, in order for you to see a working implementation and to be able to play a bit with it. Please let me know in case you have any questions or concerns regarding this matter.

    WebDropDownSelectionChanged.zip
Reply Children