Hi,
I have a problem regarding the columnShow and columnHide events. Basically, if I will call grid.setDataSource(dataSource) before the _init() method of the Menu class is called, the two events are not issued anymore. Just uncomment the indicated line (24.) in the code sample and watch the browser console: the columnHide event does not get called anymore. The same goes for the columnShow event.
Resolution: In the destroy method of the Menu class, instead of
change to
The idea is that the _updateColumnsMenuHandler is undefined at the call time, and all the configured event handlers get unbound.
Could you please provide me a time frame when this fix will be delivered and in which release?
Thanks,
Ioan
Code sample:
I have a problem regarding the columnShow and columnHide events. Basically, if I will call grid.setDataSource(dataSource) before the _init() method of the Menu class is called, the two events are not issued anymore. Just uncomment the indicated line (24.) in the code sample and watch the browser console: the columnHide event does not get called anymore. The same goes for the columnShow event.
Resolution: In the destroy method of the Menu class, instead of
1.if (that.options.columns && that.owner) {2. that.owner.unbind("columnShow", that._updateColumnsMenuHandler);3. that.owner.unbind("columnHide", that._updateColumnsMenuHandler);4.}change to
1.if (that.options.columns && that.owner && that._updateColumnsMenuHandler) {2. that.owner.unbind("columnShow", that._updateColumnsMenuHandler);3. that.owner.unbind("columnHide", that._updateColumnsMenuHandler);4.}The idea is that the _updateColumnsMenuHandler is undefined at the call time, and all the configured event handlers get unbound.
Could you please provide me a time frame when this fix will be delivered and in which release?
Thanks,
Ioan
Code sample:
01.$("#grid").kendoGrid({02. columns: [03. { field: "name" },04. { field: "age" }05. ],06. dataSource: [07. { name: "Jane Doe", age: 30 }08. ],09. columnMenu: true,10. columnHide: function(e) {11. console.log("HIDE " + e.column.field); // displays the field of the hidden column12. },13. columnShow: function(e) {14. console.log("SHOW " + e.column.field); // displays the field of the column made visible15. }16.});17.var dataSource = new kendo.data.DataSource({18. data: [19. { name: "John Doe", age: 33 }20. ]21.});22.var grid = $("#grid").data("kendoGrid");23.// uncomment the next line24.//grid.setDataSource(dataSource);