hi,
I am using layout and attach a toolbar. The situation is that in same toolbar location I have to display different toolbar according to the required need. So, I am using below customized code to remove the tool bar buttons…
---------------------------------------------------------------------------------------
this.MetaPropertyToolBarView.forEachItem(function(itemId)
{
metapropertytoolbarViewObj.RemoveItemFromToolBar(itemId);
});
metaPropertyToolbarView.prototype.RemoveItemFromToolBar = function(itemId)
{
this.MetaPropertyToolBarView.removeItem(itemId);
}
----------------------------------------------------------------------------------------
reloading different xml according as per need…
this.MetaPropertyToolBarView.loadXML(“UserMetaProperties.xml”);
this.MetaPropertyToolBarView.loadXML(“DomainMetaProperties.xml”);
this.MetaPropertyToolBarView.loadXML(“UserCosMetaProperties.xml”);
this.MetaPropertyToolBarView.loadXML(“GroupMetaProperties.xml”);
----------------------------------------------------------------------------------------
But, the problem comes when I reload the toolbar(any one of the above)… The buttons are shifting towards the right in each and every reload of it…
Where is the problem. How I can insure the starting position of toolbar buttons…
Plz help…
thanx
sandip
Hello,
Try to use the following approach after deleting all buttons.
…
this.MetaPropertyToolBarView.tr.removeChild(this.MetaPropertyToolBarView.tr.childNodes[0]);
It must resolve the problem.
thanx, its working