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

Grid Popup Edit

1 Answer 180 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chatra
Top achievements
Rank 1
Chatra asked on 24 May 2014, 05:48 PM
Hi,

I have a popup Edit Grid. And on Edit popup we have Tab strip and master Save button for all the changes in one or more tabs.

The first Tab has form in it and second and third tab has Grid in it.

when the Update/Save button is clicked on the Grid popup; any changes in second and third Tab are not taken as dirty until I make changes to form in first Tab ? 


Can any one help me in it.

Thanks,
Chatrapathi Chennam

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 28 May 2014, 07:50 AM
Hello,

Changes done to an inner array will not mark the model as dirty by default. You could use the main grid dataSource change event in order to set the dirty field to true when the inner array changes e.g.
var dataSource = new kendo.data.DataSource({
    change: function(e) {
        if (e.action == "itemchange" && (e.field == "ArrayField1" || e.field == "ArrayField2")) {
            var parentModel = e.items[0].parent().parent();
            parentModel.dirty = true;
        }
    },


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