EasyUI Forum

General Category => General Discussion => Topic started by: wymak on March 03, 2013, 08:09:51 AM



Title: unexpected datagrid behaviour after reload
Post by: wymak 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!!!
     }