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

server Filtering and Adding new item in combobox

1 Answer 200 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 15 Jul 2014, 03:18 PM
Hi i have Mvc application. where i have a text box and desired behavior is to search the item in DB and if found, widget will display the found list in suggestion options so i can add to local list 

and if the item don't exist, add the new item [ thru same widget ] in the database when we press enter.

since autocomplete Widget don't allow to add new items, i went with combobox

can we add new item in combobox widget in the same time if we are performing the server filtering

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 16 Jul 2014, 11:50 AM
Hello,

Currently the ComboBox widget (applicable for AutoComplete, DropDownList, MultiSelect too) is designed to show the end user a suggestion box with items. It is not designed to allow create/update operations through the UI, this functionality cannot be accomplished out-of-the-box. What you can do to achieve your goal is to provide to the user an additional form, which will give him/her the ability to add new item. Once it is added, you can rebind the combobox and select this new item. Here are some helpful links:

# get widget data source
http://docs.telerik.com/kendo-ui/api/web/combobox#fields-dataSource

# add item to the data source:
http://docs.telerik.com/kendo-ui/api/framework/datasource#methods-add

# set widget value
http://docs.telerik.com/kendo-ui/api/web/combobox#methods-value

Please note that this functionality is a custom solution and its implementation is up to the developer 

Regards,
Georgi Krustev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ComboBox
Asked by
Adam
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or