Refreshing Grid not updating model, but value updating in view

1 posts, 0 answers
  1. Prabhu
    Prabhu avatar
    1 posts
    Member since:
    Sep 2012

    Posted 10 Jan 2018 Link to this post

    This is my code:

    dataitem["ApproverRole1"]  = '1'

    dataitem["ApproverRole1Id"] ='1'

     

    angular.forEach(grid.dataSource.data(), function (dataitem) {                              

             dataitem["ApproverRole1"] = '2';
             dataitem["ApproverRole1Id"] = '2';    

     });

    before refresh updated data is available.

    console: 

             dataitem["ApproverRole1"] = '2';
             dataitem["ApproverRole1Id"] = '2';    

    But once below code executes then old value gets updated again in model

     $('#grid').data('kendoGrid').refresh();

    Console:

    dataitem["ApproverRole1"]  = '1'
    dataitem["ApproverRole1Id"] ='1'

    Actual value should be 2 but 1 is still there.

    Thanks for help.

     

     

Back to Top