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

2 posts, 1 answers
  1. Answer
    Gusev
    Gusev avatar
    74 posts
    Member since:
    Dec 2012

    Posted 14 Mar 2013 Link to this post

    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? )
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 18 Mar 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top