PDA

View Full Version : Double top toolbar



webtime
7 Jul 2010, 1:03 AM
Hi all....
this is my code for insert a second toolbar rendered into the first...


...... other code
,onRender:function() {
// call parent
Ltbl.Grid1.superclass.onRender.apply(this, arguments);

this.bbar2 = new Ext.Toolbar({
renderTo:this.tbar
,id: 'tb2'
,items:['Sorting order', '-', {
text:'Button'
,iconCls:'icon-key'
}, '-'
]
});
...... other codewhen i drag item onto the tb2 how ca i read the items (buttons) on it??


example of my code....
..... other code.....
this.dropTarget2s = new Ext.dd.DropTarget('tb2', {
ddGroup: "gridHeader" + this.getGridEl().id,
panel: this,
notifyDrop: function(dd, e, data) {
var btname = this.panel.getColumnModel().getDataIndex(this.panel.getView().getCellIndex(data.header));
var ss = this.get('tb2');
for (var hh = 0; hh < ss.items.length; hh++) {
Ext.removeNode(Ext.getDom(ss.items.itemAt(hh).id));
}
//this.panel.store.groupBy(btname);
return true;
}
});
..... other code.....in the instruction i must delete all items of toolbar but i got one error.....
Someone can help me???
Thanks for answer and sorry for my english!!!!!!

21308