Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
iggrid savechanges doesn't call web api update
posted

Hi,

I have project where web api uses attribute routing and somehow rest binding doesn't work on my iggrid.

On other project without attribute routing it works and update method is called after editing ended. 

What's the problem here?   I'm getting 404  PUT localhost:53300/.../8281452

//controller
// PUT api/values/5

[Route(Save)]

[HttpPut]
public void Save (int id, [FromBody]Item value)
{
}

//js

$(function () {
var dataURL = "">localhost:53300/.../values";
$("#grid1").igGrid({
dataSource: dataURL,
primaryKey: "TIDnumber",
restSettings: {
update: { url: dataURL },
remove: { url: dataURL, batch: true },
create: {
url: "dataURL",
batch: true
}
},
autoGenerateColumns: false,
height: "350px",
width: "800px",
columns: [
{ headerText: "TIDnumber", key: "TIDnumber", dataType: "number" },
{ headerText: "Description", key: "Description", dataType: "string" },
{ headerText: "Quantity", key: "Quantity", dataType: "string" }
],
features: [
{
name: "Updating",
editMode: 'row',
editCellStarted: onEditCellStarted,
editRowEnded: onEditCellEnded,
columnSettings: [{
columnKey: 'TIDnumber',
readOnly: true
},
{
columnKey: "Description",
editorType: 'string',
validation: true,
editorOptions: { required: true }
}
]
}
]
});

});

thank you

Parents Reply Children
No Data