nextdigital
6 Dec 2009, 6:17 PM
Ext.onReady(function(){
var treegrid = new Ext.tree.TreeGrid({
columns: [{
header: 'Task',
dataIndex: 'task',
width: 230
}, {
header: 'Duration',
width: 100,
dataIndex: 'duration',
align: 'center',
sortType: 'asFloat',
}, {
header: 'Assigned To',
width: 150,
dataIndex: 'user'
}],
dataUrl: 'extjs/examples/treegrid/treegrid-data.json'
});
var win = new Ext.Window({
title: 'Tree Grid',
layout: 'fit',
width: 400,
height: 350,
x: 600,
y: 50,
items: [treegrid]
});
win.show();
var grid = new Ext.grid.GridPanel({
columns: [{
header: 'Task',
dataIndex: 'task',
width: 230
}, {
header: 'Assigned To',
width: 150,
dataIndex: 'user'
}],
store: new Ext.data.JsonStore({
fields: ['task', 'user'],
data: [{
task: 'Fix TreeGrid',
user: 'Tommy Maintz'
}]
})
});
var win2 = new Ext.Window({
tbar: [{
text: 'A button'
}, {
text: 'Another button'
}],
title: 'Grid',
layout: 'fit',
items: [grid],
width: 400,
height: 350,
x: 100,
y: 50,
});
win2.show();
});
Resize any of the columns in the TreeGrid, and it will resize the columns AND buttons in the GridPanel window.
it seems to be resizing every <td> on the page?
var treegrid = new Ext.tree.TreeGrid({
columns: [{
header: 'Task',
dataIndex: 'task',
width: 230
}, {
header: 'Duration',
width: 100,
dataIndex: 'duration',
align: 'center',
sortType: 'asFloat',
}, {
header: 'Assigned To',
width: 150,
dataIndex: 'user'
}],
dataUrl: 'extjs/examples/treegrid/treegrid-data.json'
});
var win = new Ext.Window({
title: 'Tree Grid',
layout: 'fit',
width: 400,
height: 350,
x: 600,
y: 50,
items: [treegrid]
});
win.show();
var grid = new Ext.grid.GridPanel({
columns: [{
header: 'Task',
dataIndex: 'task',
width: 230
}, {
header: 'Assigned To',
width: 150,
dataIndex: 'user'
}],
store: new Ext.data.JsonStore({
fields: ['task', 'user'],
data: [{
task: 'Fix TreeGrid',
user: 'Tommy Maintz'
}]
})
});
var win2 = new Ext.Window({
tbar: [{
text: 'A button'
}, {
text: 'Another button'
}],
title: 'Grid',
layout: 'fit',
items: [grid],
width: 400,
height: 350,
x: 100,
y: 50,
});
win2.show();
});
Resize any of the columns in the TreeGrid, and it will resize the columns AND buttons in the GridPanel window.
it seems to be resizing every <td> on the page?