PDA

View Full Version : CheckboxSelectionModel and TreeGrid



danielbertini
11 Oct 2010, 12:37 PM
Is possible use CheckboxSelectionModel() in TreeGrid?
I trying with:



var smCategoryGrid = new Ext.grid.CheckboxSelectionModel();
var categoryGrid = new Ext.ux.tree.TreeGrid({
id: 'promotion-category-grid',
border: false,
columnLines: true,
sm: smCategoryGrid,
loader: new Ext.ux.tree.TreeGridLoader({
dataUrl: base_url+'catalog/category/grid',
requestMethod: "POST",
}),
columns:[
smCategoryGrid,
{header:'Nome', dataIndex:'name', width:90, sortable:true}
],
viewConfig:{
forceFit:true
}
});


But i receive error:
this.grid.getGridEl is not a function

Condor
12 Oct 2010, 3:29 AM
No. A TreeGrid isn't a GridPanel, so you can't use an Ext.grid.CheckboxSelectionModel.

TreeNodeUI does support checkboxes, but this was left out of TreeGridNodeUI.

You would have to extend TreeGridNodeUI to also support the checkboxes from it's baseclass.