EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: kelekun on June 04, 2017, 08:36:46 AM



Title: datagrid all data into mysql
Post by: kelekun 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


Title: Re: datagrid all data into mysql
Post by: jarry 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},
  //...
});


Title: Re: datagrid all data into mysql
Post by: kelekun on June 08, 2017, 05:37:14 AM
Thank you very much!