PDA

View Full Version : Reg. TreeGrid



After2050
18 Nov 2010, 5:27 AM
Hi,

How I can include a checkbox column in a TreeGrid?
Also how I can use inline editing in TreeGrid?
Any suggestions will be greatly appreciated.

Thanks & Regards
Dnana

WixSL
26 Nov 2010, 4:46 PM
> "How I can include a checkbox column in a TreeGrid?"


You could use the tpl config attribute:


var tree = new Ext.ux.tree.TreeGrid({
id: 'myTree',
columns:[{
header: 'Check Column',
width: 50,
dataIndex: 'check_value',
xtype: 'tgbooleancolumn',
tpl: '<tpl for="."><input type="checkbox" {check_value}"></tpl>'
}],
...
});

After2050
27 Nov 2010, 9:41 PM
Thank you. I'll give it a shot.

After2050
29 Nov 2010, 3:57 AM
I see a problem there, all the checkboxes are not checked. The problem is in tpl


tpl: '<tpl for="."><input type="checkbox" {check_value}"></tpl>'

I couldn't able to solve it. Any Help???

After2050
29 Nov 2010, 4:22 AM
Solved! I changed the tpl as below,


tpl: '<tpl for="."><input type="checkbox" <tpl if="check_value == true">checked="checked" </tpl> /></tpl>'

Is there any better way?