EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
October 16, 2024, 12:30:55 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
Edit rows in a datagrid full on the server side
Pages: [
1
]
« previous
next »
Print
Author
Topic: Edit rows in a datagrid full on the server side (Read 25421 times)
bvicencio
Newbie
Posts: 13
Edit rows in a datagrid full on the server side
«
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.
«
Last Edit: July 09, 2012, 06:56:23 AM by bvicencio
»
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Edit rows in a datagrid full on the server side
«
Reply #1 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.
Logged
bvicencio
Newbie
Posts: 13
Re: Edit rows in a datagrid full on the server side
«
Reply #2 on:
July 13, 2012, 11:00:50 AM »
Thank you Stworthy. But, Could you give me an example?.
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Edit rows in a datagrid full on the server side
«
Reply #3 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,
//...
});
}
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...