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

Load on Demand and AllowCustomText

5 Answers 182 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 30 Jan 2008, 09:13 AM
Hi,

This feature where if you want load on demand functionality automatically enables AllowCustomText has killed the use of RadComboBox for me.  If you have a large list of items to select from and dont want to load the entire list, but instead force the user to type the starting letters of the item they want, is there any way to stop them from submitting a custom text entry?  I dont believe hardcoding properties is a reasonable step to take and the original RadComboBox did not have this added feature - it clears the text if no matches are found.

Is there any way around this?

5 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 30 Jan 2008, 05:20 PM
Hello Jonathan,

You could do the following to achieve your task:

  1. Disable the EnableLoadOnDemand property
  2. Hook on the OnClientDropDownOpening event and call the requestItems() method of the combobox by passing the enetered text as a parameter:
    sender.requestItems(sender.get_text());
    Thus, you will be able to filter the items by the entered text using the e.Text property in the ItemsRequested event handler.
  3. Disable the AllowCustomText
  4. Enable the MarkFirstMatch property

Hope this is acceptable for you.

regards,
Nick
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jonathan
Top achievements
Rank 1
answered on 31 Jan 2008, 07:50 AM
Thanks for the suggestion Nick, I will try it out and report back.

Thanks again.
0
Chris
Top achievements
Rank 1
answered on 04 Mar 2008, 03:10 PM
Would you be able to provide sample for my reference? I tried to follow your step but nothing happens from the latest prometheus version.
0
Nikolay
Telerik team
answered on 05 Mar 2008, 12:25 PM
Hi Chris,

Attached, please find a small and running project on the matter. Download the files and give them a go.

Hope this helps.

Regards,
Nick
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
harun küçük
Top achievements
Rank 1
answered on 16 Dec 2009, 05:27 PM
thansk for your suggestion Nick. It is running. now
Tags
ComboBox
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Jonathan
Top achievements
Rank 1
Chris
Top achievements
Rank 1
harun küçük
Top achievements
Rank 1
Share this question
or