You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When declaring dGrid with DijitRegistry, editors are not destroyed on dgrid.destroy(). Behaviour will change, when DijitRegistry extension is removed... in editor.js there is some testing for editOn parameter (line #497), which is in this case null... so column.editorInstance.destroyRecursive() is not fired.
In this test, Grid is destroyed, when tab is closed. You can uncomment destroy() method of editor to see, it will not be called on grid.destroy(). Using latest master version of dgrid.
The text was updated successfully, but these errors were encountered:
First Error:
In the onClose handler for the tab you remove the gridTab before calling destroy. When you do this the dom elements for the grid are removed. So calling destroy later causes the child dijits to not trigger their destroy function.
Second Error:
In your destroy handler for your TextBox editors you log a message saying that destroy was called. But you never call this.inherited so the dijits are not removed from the registry.
Thank you very much James for your reply and assistance! 👍 I will test it. About the second error, there was a problem, that a destroy method was not called at all (so I didn't care about including this.inherited), but as you said, it is (probably) related to the first error.
James, I was following official documentation for Dijit Layout - it says, you have first remove child (tab), then call destroy() - see http://dojotoolkit.org/reference-guide/1.9/dijit/layout.html (part "Remove Child"). I can confirm, you are right in case of dgrid -> simply calling destroy() is working OK.
May be it is good to consider highlighting this modified logic in documentation of dGrid and compare it with example from official dijit layout doc (link above).
When declaring dGrid with DijitRegistry, editors are not destroyed on dgrid.destroy(). Behaviour will change, when DijitRegistry extension is removed... in editor.js there is some testing for editOn parameter (line #497), which is in this case null... so column.editorInstance.destroyRecursive() is not fired.
Wiki says (https://github.com/SitePen/dgrid/wiki/Working-with-Widgets), that dGrid.removeRow() is fired, when grid is destroyed... this also doesn't seems to be true. Try it.
Test for dgrid.destroy() derived from /dgrid/test/dijit_layout_programmatic.html
https://gist.github.com/anonymous/8273129
In this test, Grid is destroyed, when tab is closed. You can uncomment destroy() method of editor to see, it will not be called on grid.destroy(). Using latest master version of dgrid.
The text was updated successfully, but these errors were encountered: