PDA

View Full Version : [CLOSED] Grid Header & HeaderMenu (v2)



softmachine2011
Jun 18, 2012, 11:38 AM
In relation to this thread: http://forums.ext.net/showthread.php?17574-CLOSED-Grid-Header-amp-HeaderMenu

In v2 this function doesn't work because 'beforeColMenuShow' doesn't exists. What I have to use now?


setMenuHeader: function (grid, columnId, headerMenuText) {
var view = grid.getView();
view.beforeColMenuShow = view.beforeColMenuShow.createSequence(function () {

view.colMenu.items.each(function (item) {
if (item.itemId.substr(4) === columnId) {
item.setText(headerMenuText);
}
});
});
}

Daniil
Jun 18, 2012, 12:28 PM
Hi,

In Ext.NET v2 please just use the Column MenuText property

Example

<ext:Column runat="server" DataIndex="test" MenuText="Some Menu Text" />

See also
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.column.Column-cfg-menuText (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.grid.column.Column-cfg-menuText)

softmachine2011
Jun 18, 2012, 1:06 PM
It works again, thanks!