It looks like the editRowEnding event is not getting fired when vertically scrolling a virtualized grid while a row is being edited. The row just switches to display mode and loses the data that was being entered, without any opportunity to save it. Is there another event I can catch when this happens or is this a bug with the editRowEnding?
-Jared
Hello Jared,
Thank you for your patience while our development team was looking into this.
The cause of the issue is that when scroll is triggerred in virtual grid, then updating is not able to keep editing, because whole grid is rerendered and that action can not be canceled .
The best workaround is to
features: [ { name: "Updating", editRowEnding: function (event, ui) { var evnt = event ? event.originalEvent : null; var id = evnt && evnt.type === 'mousedown' ? evnt.target.id : null; // Check for scrollbar-action by using mousedown and id of target-element. // That element should be one of the scrollbars used by grid. if (id && id.indexOf('crollContainer') > 0) { var updating = ui.owner, vals = {}, i = -1, cols = updating.grid.options.columns; while (++i < cols.length) { // To get references to editors, the editorForKey method can be used. // It will return jquery object, which represents editor. // To get value from editor application should "typecast" to a specific editor. // That can be igEditor, igCombo, igRating, or checkbox-provider. // Application also may use internal widget igEditorFilter which "options" contains reference to editor-provider // and in this case no typecast or "guess" is needed. var key = cols[i].key, editor = updating.editorForKey(key); if (editor) { vals[key] = editor.data('igEditorFilter').options.provider.getValue(); } } // The updateRow must be called with delay, // not earlier when grid is already repainted after scroll-action. // Otherwise, it will trigger exceptions or misbehavior. setTimeout(function () { updating.updateRow(ui.rowID, vals); }, 100); } } } ]
]
I am attaching the whole working sample.
Please let us know if you need further assistance.
Hi Bhadresh,
Thanks for looking into this, we're now using the 2012 Volume 1 version of the jQuery library, which by the way has solved several of our outstanding issues so I'm very excited about it :-)
Thanks,-Jared
I noticed Tsvetelina has created development issue 114465 to address this functionality.
Please let me know what version of NetAdvantage of jQuery product you are using so I may update development issue 114465 with this detail.
Hello JaredHuffman,
Thank you for reporting this.
The issue happens because the row exits editing mode without updating when clicking on the vertical scroll
The editRowEnding is fired but ui.update is false if virtualization is enabled.
I have attached a sample demonstrating that the event is fired.
I created development issue for this
114465 - When virtualization is enabled and row is in editMode, if you click on the vertical scroll no changes are saved
and will ask a member of Developer Support team to contact you.