Hii, i have some problem with updating data on data grid.
If in a first time adding data and than that new data is updated, that data not update but adding new data,
If page is reloaded or in a first time will be update data, update process is working.
this my script :
main problem : update process can't be working again after create process is execute, and always execute create process when it will do updating data.
Thank
If in a first time adding data and than that new data is updated, that data not update but adding new data,
If page is reloaded or in a first time will be update data, update process is working.
this my script :
$(document).ready(
function
() {
dataSource =
new
kendo.data.DataSource({
transport: {
read: {url:
"<?=base_url()?>/bank"
},
create: {url:
"<?=base_url()?>/bank/create"
,type:
"POST"
},
update: {url:
"<?=base_url()?>/bank/update"
, type:
"POST"
},
destroy: {url:
"<?=base_url()?>/bank/destroy"
,type:
"POST"
},
},
batch:
true
, pageSize: 25,
schema: {
model: {
id:
"id_bank"
,
fields: {
nama_bank: { type:
"string"
},
}
}
}
});
//kendo grid
$(
"#grid_bank"
).kendoGrid({
dataSource: dataSource, editable:
"popup"
, height: 450,
filterable:
true
, sortable:
true
, pageable:
true
,
toolbar: [
"create"
],
columns: [
{ field:
"nama_bank"
,title:
"Nama"
, filterable:
true
},
{ command: [
"edit"
,
"destroy"
], title:
" "
, width:
"160px"
}
]
});
});
main problem : update process can't be working again after create process is execute, and always execute create process when it will do updating data.
Thank