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

Adding user values to DB

1 Answer 53 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 02 Feb 2012, 04:21 PM
Hi,

Is it possible to update the underlying table that feeds a combobox with user entered values? For example, if I have a combobox with a remote binding to a mysql table called colors (id, color columns) , would it be possible to add an update on change when a user adds a color that's not in the table?

In other words, can I add an update to the data source code that adds a record to the table when a user enters a value not in the table? I'm thinking if I add an update transport to the datasourse and tie it to the onchange event that should work?

It would be nice if that were an option when initializing a combobox, like update: true.

Thanks for any help on this.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 07 Feb 2012, 10:24 AM
Hello Tony,

 
One possible solution is to make an Ajax request to the serve on combobox change event and then reload the data. Other option is to define a model structure and create transport of the DataSource. Then in the change event to call the add() method of the DataSource and after that sync the data.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ComboBox
Asked by
Tony
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or