Title: Edit rows in a datagrid full on the server side Post by: bvicencio on July 03, 2012, 08:17:45 AM I need to know how to record changes in a datagrid on the server. I have a datagrid with 40 rows of data, which I can edit them, but to save the changes of all ranks edited with a single button, not for each row as shown in the tutorial.
I will be very grateful for your help. Title: Re: Edit rows in a datagrid full on the server side Post by: stworthy on July 09, 2012, 04:14:13 PM Call getChanges method to get all inserted, updated, deleted, appended records. The next step is to post them to server.
Title: Re: Edit rows in a datagrid full on the server side Post by: bvicencio on July 13, 2012, 11:00:50 AM Thank you Stworthy. But, Could you give me an example?.
Title: Re: Edit rows in a datagrid full on the server side Post by: stworthy on July 14, 2012, 08:17:47 PM The code below shows how to get inserted records and save them.
var inserted = $('#dg').datagrid('getChanges','inserted'); // Now post them to server: for(var i=0; i<inserted.length; i++){ var record = inserted; $.ajax({ url:'...', data:record, //... }); } |