View Full Version : [FIXED-5865][3.1] TreeGrid with enableHDMenu:false option.

11 Jan 2010, 4:37 AM
I try create TreeGrid without HDMenu (enableHdMenu: false) and got error "hdmenu is undefined" in following function:

onAfterTreeRender : function() {
var hmenu = this.tree.hmenu;
{itemId:'asc', text: this.sortAscText, cls: 'xg-hmenu-sort-asc'},
{itemId:'desc', text: this.sortDescText, cls: 'xg-hmenu-sort-desc'}
this.updateSortIcon(0, 'asc');

in Ext.ux.tree.TreeGridSorter object.
I think we should verify that this.tree.hmenu is defined.

set enableSort option to false. But in this case you loss sorting functionality by click.

11 Jan 2010, 5:19 AM
@luckyman -- Thanks for the report.

Fixed in SVN for Ext 3.1.1 release.

12 Jan 2010, 6:48 AM
In tree grid example remove "width" parameter. In this case table headers and columns have different width.
Added "table-layout:fixed" style to header table(Ext.ux.tree.TreeGrid in internalTpl) fix problem in my case, but not fix in example:(

this.internalTpl = new Ext.XTemplate(
'<div class="x-grid3-header">',
'<div class="x-treegrid-header-inner">',
'<div class="x-grid3-header-offset">',
'<table cellspacing="0" cellpadding="0" border="0" style="table-layout:fixed"><colgroup><tpl for="columns"><col /></tpl></colgroup>',
'<thead><tr class="x-grid3-hd-row">',
'<tpl for="columns">',
'<td class="x-grid3-hd x-grid3-cell x-treegrid-hd" style="text-align: {align};" id="', this.id, '-xlhd-{#}">',
'<div class="x-grid3-hd-inner x-treegrid-hd-inner" unselectable="on">',
this.enableHdMenu ? '<a class="x-grid3-hd-btn" href="#"></a>' : '',
'{header}<img class="x-grid3-sort-icon" src="', Ext.BLANK_IMAGE_URL, '" />',
'<div class="x-treegrid-root-node">',
'<table class="x-treegrid-root-table" cellpadding="0" cellspacing="0" style="table-layout: fixed;"></table>',