View Full Version : how to change text of toolbar dynamically

25 Oct 2011, 3:06 AM
Hi Guys,

I have toolbar on my gridpanel.As below

var gridtoolbar = Ext.create('Ext.toolbar.Toolbar', { items : [{
text: ''

I am displaying text on toolbar when I select value from one combobox.Value is getting and displaying there

gridtoolbar.add('Code : '+code);

But I want to clear the text of toolbar and display new when I change selection of combobox.
Presently it is appending with existing value.

Please let me know how to clear existing text of toolbar and add new one.