Force users to choose from Dropdown

4 posts, 0 answers
  1. Markus
    Markus avatar
    205 posts
    Member since:
    Nov 2005

    Posted 27 Jun 2013 Link to this post

    Good day to all 

    I have the following code: 

    telerik:RadSearchBox ID="RadSearchBox1" runat="server" Width="250px" Skin="MetroTouch" DataSourceID="OpenAccessLinqDataSource1" CssClass="" DataTextField="user_firmaname"
        DataValueField="user_id" Culture="de-DE" onsearch="RadSearchBox1_Search" ShowSearchButton="False">
     <DropDownSettings Height="400" Width="670" >
                            <li class="col1">Firma</li>
                            <li class="col2">Ort</li>
                            <li class="col1">
                                <%# DataBinder.Eval(Container.DataItem, "user_firmaname") %></li>
                            <li class="col2">
                                <%# DataBinder.Eval(Container.DataItem, "user_ort") %></li>

    protected void RadSearchBox1_Search(object sender, SearchBoxEventArgs e)
                if (e.Text  != null)
                    string firmenname = e.Text;
                    firmenname = firmenname.Replace("+", "und");
                    Response.Redirect("/firmen/" + e.Value + "/" + firmenname);
                    RadSearchBox1.EmptyMessage = "keine Firma gefunden";

    The problem is that if the client does not pick from the dropdown but simply hits enter e.value of course is not what I am looking for.

    So I need a way to disable enter and have the client force to pick from dropdown.

    You can try it here: left side 


  2. Plamen
    Plamen avatar
    2723 posts

    Posted 01 Jul 2013 Link to this post

    Hi Markus,

    This is a known issue in RadSearchBox that is currently not returning any value because it is not known which one to return when there a re many items in the drop-down. Currently we are researching the scenario and  from the upcoming service pack we plan to add a property that will give you the chance to select the first item from the drop-down on a click of the search button.

    Hope this information will be helpful.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. DevCraft R3 2016 release webinar banner
  4. Dehanys
    Dehanys avatar
    1 posts
    Member since:
    Aug 2016

    Posted 13 Oct Link to this post

    Is there any solution to this issue yet?
  5. Plamen
    Plamen avatar
    2723 posts

    Posted 14 Oct Link to this post


    You can set the HighlightFirstMatch property to true that is available in the control in the latest versions of the controls.

    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top