EasyUI Forum
July 17, 2024, 04:09:19 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Save datagrid rows to database  (Read 21142 times)
nbasicx
Newbie
*
Posts: 4


View Profile
« on: September 20, 2012, 08:26:41 AM »

Hi,

How can I save the entire datagrid rows to the database?

NB:
I want datagrid not editable datagrid.
Logged
anton.dutov
Newbie
*
Posts: 27


View Profile
« Reply #1 on: September 24, 2012, 06:42:49 PM »

Something like that
Code:
    var rows = tbl.datagrid('getRows');
    $.each(rows, function(i, row) {
      $.ajax("/api/data.balance.data/", {
        type:'POST',
        dataType: 'json',
        data:row
      });
    });
Logged
nbasicx
Newbie
*
Posts: 4


View Profile
« Reply #2 on: September 26, 2012, 02:38:20 AM »

thank you,it worked!
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!