Contains tips for configurators working with Aware IM
#51824 by hpl123
Mon Oct 14, 2019 11:25 am
Hi all,
Here is a hack to autosave a query after a inline edit (and is a hack so not beautiful and can probably be done in a better way but it works). The config is 3 simple steps so not doing a sample BSV:

1. Add the "Save inline edits" operation to the query (so you get the button where a user can save edits) and add ID "saveinlineedit" to the operation
2. Add the following to the query render script:
Code: Select allsetInterval(function(){ if ($('.k-dirty-cell').length){ $( "#saveinlineedit" ).trigger( "click" ); } }, 1000);

3. Open query and edit some editable attribute

The "downside" of this solution is tabbing through different attributes and doing multiple changes in a row is not possible as when the save is performed, the query is refreshed and the tab position is lost etc.. If anyone has additional ideas etc. and/or wants to clean this up (or have done this in a better way), please share. Thanks

PS: This is just something I threw together so have no clue if it might cause other problems, if the dirtycell class is used somewhere else etc. so use at own risk.
#51825 by hpl123
Mon Oct 14, 2019 11:36 am
To also include checkboxes use the following code in step 2:
Code: Select allsetInterval(function(){ if ($('.k-dirty-cell,.k-dirty').length){ $( "#saveinlineedit" ).trigger( "click" ); } }, 1000);

Who is online

Users browsing this forum: No registered users and 3 guests