This is a migrated thread and some comments may be shown as answers.

Rad ComboBox focus

4 Answers 188 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
vipin
Top achievements
Rank 1
vipin asked on 08 Dec 2011, 08:08 AM

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.

4 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 12 Dec 2011, 02:04 PM
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
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 02 Feb 2012, 12:25 PM
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

0
Princy
Top achievements
Rank 2
answered on 02 Feb 2012, 01:50 PM
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.
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 02 Feb 2012, 02:02 PM
Thanks Princy, works OK!
Tags
ComboBox
Asked by
vipin
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Princy
Top achievements
Rank 2
Share this question
or