javascript - Sync dataview with database -
i'm using slickgrid dataview edit tables 5000 rows, getting data mysql database using laravel. have created ajax save function saves data database runs extremely , freezes grid few seconds:
function testsave() { var request; var token = $('meta[name="csrf-token"]').attr('content'); request = $.ajax({ url: "/est/public/estimate/{{ $id }}", type: "patch", datatype: "json", params: {_token:token}, async: true, data: { data: json.stringify(dataview.getitems()), _token:token } }); } is there way of saving data without freezing? thought of using grid.onclick or onbeforeeditcell , saving each row individually when changes, functions inserting row change "order" value on every row below insert.
what best way keep dataview , database in sync?
this complex issue.
firstly, ajax call should asynchronous, shouldn't block 5 seconds.
if passing 5000 rows server, json encoding taking while. best passing changed rows server. in lot more complex @ first seems.
you might best using existing framework handle data you. breeze choice.
Comments
Post a Comment