EasyUI Forum
May 09, 2024, 10:17:55 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: datagrid all data into mysql  (Read 3898 times)
kelekun
Newbie
*
Posts: 2


View Profile
« on: June 04, 2017, 08:36:46 AM »

Hello, I am not sure if I have missed a similar post during my search (in which case I apologize for it)  but I was wondering if it is possible to pass multiple lines of data from a datagrid to a php fie which would save then the data into a mysql db. Is there any example or something similar to check from where I could start? Thank you very much! Kele
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: June 05, 2017, 07:21:16 AM »

You can call 'getRows' to get all the rows and then post them to the server.
Code:
var rows = $('#dg').datagrid('getRows');
var data = JSON.stringify(rows);  // stringify the rows
$.post({
  data:{data: data},
  //...
});
Logged
kelekun
Newbie
*
Posts: 2


View Profile
« Reply #2 on: June 08, 2017, 05:37:14 AM »

Thank you very much!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!