EasyUI Forum
April 24, 2024, 10:12:17 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: [edatagrid] 1.5.4, 1.5.5, editRow not working after updateRow call while editing  (Read 5562 times)
jtg
Newbie
*
Posts: 3


View Profile
« on: April 24, 2018, 03:32:14 AM »

"updateRow", called on row being edited after "editRow" call, deactivates the editors and all subsequent "editRow" calls does not work.

Code:
$("#foo").edatagrid('editRow', 0); // works
$("#foo").datagrid('updateRow', {index: 0, row: {'field': 1}}); // row deactivated
$("#foo").edatagrid('editRow', 0); // doesn't work

Test case https://jsfiddle.net/a64x52nq/

For v1.5.4 this sequence completely breaks editRow
For v1.5.5 editRow stays broken for updated row only, and activating another row for edit can fix it (not sure)
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: April 24, 2018, 05:08:37 PM »

You should cancel the row editing before updating a row. Please try this code instead.
Code:
$("#foo").edatagrid('editRow', 0);
$("#foo").edatagrid('cancelRow')
$("#foo").datagrid('updateRow', {index: 0, row: {'itemid': 1}});
$("#foo").edatagrid('editRow', 0);
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!