EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: markalves on September 02, 2019, 08:37:19 AM



Title: edatagrid unsaved data notification
Post by: markalves on September 02, 2019, 08:37:19 AM
Hi to all,
I use edatagrid as a subform, I would like to know if there is a way to notificate the user if there are unsaved rows in edatagrid (i.e. added rows without click save button)...is it possible ?


Title: Re: edatagrid unsaved data notification
Post by: jarry on September 03, 2019, 02:30:12 AM
Retrieve the 'editIndex' value to detect if there is a unsaved row.
Code:
var editIndex = $('#dg').edatagrid('options').editIndex;
if (editIndex >= 0){
  //...
}


Title: Re: edatagrid unsaved data notification
Post by: markalves on September 03, 2019, 07:23:16 AM
Thank you very much this worked but there is a way to launch the save action from an external(from edatagrid)  button ?