EasyUI Forum

General Category => Bug Report => Topic started by: jtg on April 24, 2018, 03:32:14 AM



Title: [edatagrid] 1.5.4, 1.5.5, editRow not working after updateRow call while editing
Post by: jtg 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)


Title: Re: [edatagrid] 1.5.4, 1.5.5, editRow not working after updateRow call while editing
Post by: jarry 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);