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

Update not calling server method

1 Answer 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anoop
Top achievements
Rank 1
Anoop asked on 13 Jun 2020, 11:04 AM

Hi, My kendo inline grid is not calling the update method in controller, when any of its fields is autopopulated dynamically.

I am not manually editing any of the fields in the particular row, instead the fields are getting automatically populated. And on update click I need to do validation in server controller method .But unfortunately the control is not going to the server method on update button click.

Can someone help me to resolve this,

 

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 17 Jun 2020, 03:38 PM

Hi Anoop,

How exactly are the record fields populated? For example, setting the field value with the dataItem's set method, as demonstrated below, works as expected and on clicking the "Save" button in the Grid's toolbar, call to the "Update" action is sent.

<input type="button" value="Set Value" onclick="setValue()" />

click handler:

function setValue() {
  var grid = $("#grid").data("kendoGrid");
  var dataItem0 = grid.dataSource.data()[0];
  
  dataItem0.set("ProductName", "apple");
}

Regards,
Ivan Danchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Grid
Asked by
Anoop
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or