EasyUI Forum
May 16, 2024, 01:16:10 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: unexpected datagrid behaviour after reload  (Read 11414 times)
wymak
Newbie
*
Posts: 26


View Profile
« on: March 03, 2013, 08:09:51 AM »

In a datagrid, I write an 'afterEdit' event handler, why the reloaded grid did not reflect the change in row data?

     onAfterEdit: function(rowIndex, rowData, changes) {
            
       // reload the grid
        $('#dg').edatagrid('reload');
       // select back the row
        $('#dg').edatagrid('selectRow', rowIndex);
               
       // fetch that row from the updated grid
   var row = $('#dg').edatagrid('getSelected');
   alert(rowData.tx);  // show the new updated value
   alert(row.tx);        // show the old value!!!
     }
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!