Skip to content

Infragistics Community Forum / Web / Ultimate UI for ASP.NET Web Forms / Stop Drop Down from auto-selecting first item in list

Stop Drop Down from auto-selecting first item in list

New Discussion
Scott
Scott asked on Oct 21, 2015 7:45 PM

I have a webdropdown with three items in the list. ALL of them are set to selected=”false” but when the webform displays, the first one in the list is always selected.

On Page_Load, the selectedindex is -1 as expected, but somewhere in between that and the form displaying it is selecting it for some reason, what’s going on?

Sign In to post a reply

Replies

  • 0
    [Infragistics] Tsvetelina Georgieva
    [Infragistics] Tsvetelina Georgieva answered on Nov 4, 2010 11:38 AM

    Hello Scott,

     

    Are you using DisplayMode="DropDownList" ?

     

    In this case this is how the WebDropDown is supposed to work.

     

    When the WebDropDown is in DropDownList  mode the conrol behaves as the standard ASP DropDownList control

     

     

    You can assure that the <asp:DropDownList> will work in the same way.

     

    Let me know if you need further assistance.

    • 0
      NGIT2013
      NGIT2013 answered on Nov 4, 2010 8:44 PM

      Tsvetelina,

      Well that explains my problem (I posted down a few from this). I was having the same issue; clearing all the selected items, but it always selecting the first item in the list. So I changed it to just a Drop Down rather than a list. True, it now doesn't select anything… BUT in the text for the control it is still showing the first line of text (i.e. the drop down shows the first selection in the list, but when I drop-down the list nothing is selected). I can erase the list and tab away, and it then looks fine (no text, nothing selected in the drop down).

      Although this would work (I would really rather have a drop down list) I can make do with it IF we can figure out a way to blank out the text in the line when the form is displayed and nothing is selected. What do we have to do for this to work?

      /Tom

      • 0
        Alexander Todorov
        Alexander Todorov answered on Nov 4, 2010 9:06 PM

        You can try setting AutoSelectOnMatch = false

         

        Thanks,

        Angel

      • 0
        Ravina Agarwal
        Ravina Agarwal answered on Oct 17, 2015 8:32 AM

        No such option available. Plz tell some other solution.

      • 0
        Bernie
        Bernie answered on Oct 21, 2015 7:45 PM

        I know this isnt the best solution for the problem but I add an empty item in the drop down 

        cmbDropDown.Items.Insert(0, New DropDownItem("", ""))

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Scott
Favorites
0
Replies
5
Created On
Oct 21, 2015
Last Post
10 years, 10 months ago

Suggested Discussions

Created by

Created on

Oct 21, 2015 7:45 PM

Last activity on

Feb 26, 2026 7:14 PM