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

Problem update data

1 Answer 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
rooney
Top achievements
Rank 1
rooney asked on 12 Oct 2012, 03:16 AM
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 :
$(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

1 Answer, 1 is accepted

Sort by
0
Deepak kumar
Top achievements
Rank 1
answered on 17 Nov 2012, 08:47 AM
I have the same problem.After adding a record to the grid if i updates or deletes some other record each time it adds a new record (with same values )to the database.Please someone post the solution as soon as possible.

Thanks..
Tags
Grid
Asked by
rooney
Top achievements
Rank 1
Answers by
Deepak kumar
Top achievements
Rank 1
Share this question
or