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

value(t) doesn't change model in grid row while popup editing

1 Answer 289 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Gusev
Top achievements
Rank 1
Gusev asked on 14 Mar 2013, 02:00 PM
I have:
1. Grid with clientbinding and popup editing
2. On popup window I have a ComboBox with client binding

As I guess, ComboBox is connected with Model in grid row. And then I change selection in ComboBox manually, this changes go to Model.
But, if I change ComboBox value with method value(t), Model in grid doesn't change (dirty = false). So, if I click Update Button on popup Window - nothing happened.
I've tried to fire "change" event (...trigger("change")) with value(t), but in doesn't work too.

P.S. Do you speak Russian? )

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 18 Mar 2013, 09:59 AM
Hello Gusev,

Indeed, the model is not changed. I would suggest to set the model field directly instead of changing the combobox value which is bound to it.
To get the model which is currently being edit you can use the following:

var model = $('#gridName').data().kendoGrid.editable.options.model;
model.set('foo',42);

Keep in mind that retrieving the model this way is only available if the Grid is currently in edit mode.

I am sorry no, the official language for communication within the forums and the support system is English.

Kind Regards,
Petur Subev
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
Gusev
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or