Rad ComboBox focus

5 posts, 0 answers
  1. vipin
    vipin avatar
    7 posts
    Member since:
    Apr 2011

    Posted 08 Dec 2011 Link to this post

    Hi sir,

     

    I have used a rad combobox for listing states, I have set data source and AllowCustomText="true". When focus on the combobox then listed all items, I wants the items are listed only after enter a text in the rad combobox (drop down disabled on focus) .  eg:- if user enter ‘a’ then first letter of the sate will appear in the list.

  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 12 Dec 2011 Link to this post

    Hi Vipin,

    Could you please provide the implementation of your RadComboBox so I could have a better view of the exact scenario that you are trying to implement.

    Kind regards,
    Dimitar Terziev
    the Telerik team
    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 their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 02 Feb 2012 Link to this post

    I have the same issue: Is it possible to let the ComboBox act like a Textbox so that:

    • No dropdown on focus;
    • Dropdown after some characters are putted in the box;
    • hide the dropdown arrow.

    BR,
    Marc

  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 Feb 2012 Link to this post

    Hello,

    Try setting ShowToggleImage property of RadComboBox as false to hide the dropdown arrow.
    Also try the following javascript to achieve the scenario.
    JS:
    function OnClientDropDownOpening(sender, args)
    {
      if (sender.get_text() == "")
      {
         args.set_cancel(true); //hide dropdown on focus
      }
    }
    function OnClientKeyPressing(sender, args)
    {
        sender.showDropDown();//show dropdown after entering some characters
    }

    Thanks,
    Princy.
  6. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 02 Feb 2012 Link to this post

    Thanks Princy, works OK!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017