Hi,
I have a grid with an "Apply Defaults to All" button which updates all of the date and score values for each row in the grid. However when I click the "Undo" button (which reverts the transactions to the previous values) the date values are reverted to a weird format.
E.g.
before: 12/24/1998
after: Thu Dec 24 1998 00:00:00 GMT-0800 (Pacific Standard Time)
Please see attached example.
1) click "Apply Defaults to All" button.
2) click "Undo"
Many Thanks,
Rick
Hi Hristo,
I've updated the example (attached) with the excluded code and am still not seeing the error (that I see in production). This leads me to believe it may be an error exclusive to IE, however I cannot confirm this because I cannot get the grid to load in IE11.
Can you see if you can get the attached example running in IE11?
Thanks for this. It seems to work fine in the example in Chrome (however in IE11 - our target browser - the grid doesn't even load). When I include the code in my application I get an error:
JavaScript runtime error: cannot call methods on igGridUpdating prior to initialization; attempted to call method 'destroy'.
I can think of two reasons why it may be working in the example and not in my application:
1) The example I provided is a bit stripped down. Some other code elements I excluded for the example may be having an influence.
2) There may be a difference between IE and Chrome.
I will explore #1 and try to create an example that includes more of the "moving parts" that are actually in use on my end to see if that introduces the error. However can you see if you can get the example you provided working in IE11? When I try to run the example in IE11 the grid will not even load and just the buttons appear on the page.
Many Thanks.
Hello Rick,
This seems like an issue with the date dataType and it only occurs if the cell has been edited programmatically. A possible workaround is to re-render the grid after rolling back the transactions:
function OnUndoClick(e) { updates = $.extend({}, grid.data('igGrid').pendingTransactions()); $.each(updates, function (index, transaction) { grid.igGrid("rollback", transaction.rowId, true); });
columns = $("#grid").igGrid("option", "columns"); $("#grid").igGrid("renderMultiColumnHeader", columns);
....
return false;}
Please let me know if you have further questions on the issue, I will be glad to help.
Best Regards,Hristo AnastasovDeveloper Support EngineerInfragistics, Inc.