2011年3月12日 星期六

dojox.grid.DataGrid tricks: Quickly enable system context menu

I'm fighting with dojox.grid.DataGrid event system and found it's really complicated to hack its event propagation because it's pluggable design.

If you want to use system context menu on DataGrid, try this code:


dojo.mixin(dijit.byId("your-datagrid").focus, {
doContextMenu: function(e){}
});

Then it brings the browser context menu when you right click mouse on your data grid :)
--
朱可
http://www.netvibes.com/shawnzhu

0 评论: