PDA

View Full Version : Disable Grid column context , menu Item "Columns"



mmax
22 Nov 2007, 2:12 AM
I am trying to add a custom menu into Grid column context menu ,
and remove Standard menu Item "Columns".

Both actions take place
custom menu gets added, standard menu "Columns" does not show up.

But I get an error
-----
item.destroy is not a function
remove(Object id=columns)ext-all-debug.js (line 24478)
(no name)()edit-grid.js (line 150)
fire()ext-all-debug.js (line 1504)
fireDocReady()ext-all-debug.js (line 1541)
[Break on this error] item.destroy();
-----

Reading the forums I found out that I am passing wrong hmenu.remove() reference !!
What reference to "columns" should I pass ?

THX
madmax

Code used
---snip---
grid.getView().hmenu.add( {
id:"hmenu_add",
text: "hmenu.add TEST",
icon: '../shared/icons/fam/plugin.gif',
handler: function() {
alert("My test item clicked");
}
});


grid.getView().hmenu.remove( {
id:"columns"
});
---snip---

brian.moeskau
22 Nov 2007, 6:24 AM
Moved to Help.