I want to add a new button on toolbar of my newly created tab. While I am trying to add a button to my class which is bind to that tab, by default, it goes to the main toolbar at the top instead of on the tab toolbar. Any suggestion?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
By default, all actions will show up in the main toolbar. To hide them, you need to add an entry in the CallbackCommands section of the page. For example, if you look at the customers page, you will find an "Add Contact" button in the Contacts tab. This button is not visible in the main toolbar because of this line in the CallbackCommands section:
<px:PXDSCallbackCommand Name="NewContact" Visible="False" CommitChanges="true" />
回答2:
Along with above code fix, need to add below under grid also
<CustomItems>
<px:PXToolBarButton Text="New Contact">
<AutoCallBack Command="NewContact" Target="ds" />
</px:PXToolBarButton>
</CustomItems>