Hi guys,
I'm working with a Read/Update trasport on kendo grid.
On Update I'd like to pass just 1 param to my server handler.
here is my grid:
as you can see, in this case, only 1 param is editable ("Abilitato")
To update this field I only need tha updated value and the id.
With the current code, serverside, I get the whole line and since the object is quite big (for example it also contains a encoded string of the user picture),
I need to reduce the transported data.
Is that possible?
side question:
is it possible to implement transport only for update? using as dataSource a local list? I tried but I got only errors!
Thanks
Fabio!
I'm working with a Read/Update trasport on kendo grid.
On Update I'd like to pass just 1 param to my server handler.
here is my grid:
$(
"#userGrid"
).data(
"kendoGrid"
).setDataSource(
new
kendo.data.DataSource({
//data: userList,
transport: {
read: {
url: MyAxitea_Config.baseURL +
"Services/UserHandler.ashx/GetUserListByCurrentUser"
,
type:
"POST"
},
update: {
url: MyAxitea_Config.baseURL +
"Services/UserHandler.ashx/UpdateUserAuthById"
,
dataType:
"json"
,
type:
"POST"
/*,
data: function (options) {
return {
id: options.IdUtente,
abilitato: options.Abilitato
}
}*/
}
},
schema: {
model: {
id:
"IdUtente"
,
fields: {
Nome: { type:
"string"
, editable:
false
},
Cognome: { type:
"string"
, editable:
false
},
Alias: { type:
"string"
, editable:
false
},
IdPrivilegio: { type:
"int"
, editable:
false
},
Email: { type:
"string"
, editable:
false
},
Abilitato: { type:
"boolean"
},
DataDisattivazione: { type:
"date"
, editable:
false
},
}
}
},
pageSize: 10,
sort: { field:
"IdPrivilegio"
, dir:
"asc"
}
}));
To update this field I only need tha updated value and the id.
With the current code, serverside, I get the whole line and since the object is quite big (for example it also contains a encoded string of the user picture),
I need to reduce the transported data.
Is that possible?
side question:
is it possible to implement transport only for update? using as dataSource a local list? I tried but I got only errors!
Thanks
Fabio!