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

[Solved] General ComboBox questions

1 Answer 109 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marc Simkin
Top achievements
Rank 2
Iron
Iron
Veteran
Marc Simkin asked on 24 Jul 2011, 09:36 PM
Hi:

I have two general questions about the combobox.

1) How do you set a default value used to instruct the user what to do.  For example, "select a group".  This value should appear in the input area of the combo.  I would expect it to disappear once the user starts to type something in the input area.

2) If the combobox is databound via Ajax, and calls a server method that returns a list of items.  How can I do additional filter of the data returned before it is placed in the listbox.?

thanks

marc

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 25 Jul 2011, 08:37 AM
Hello Marc,

Straight onto your questions:

#1:
This is not a built-in feature, but it can be easily achieved using JavaScript. Check this code library which shows how to achieve your goal.

#2:
You will need to wire onDataBound event and modify component.data and rebind the component:
function dataBound() {
    var combobox = $(this).data("tComboBox");
 
   //var modify data
   // var data = combobox.data;
 
  
  //rebind combo
  // combobox.dataBind(data);
}


All the best,
Georgi Krustev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
ComboBox
Asked by
Marc Simkin
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Georgi Krustev
Telerik team
Share this question
or