Adding button on newly created tab

爱⌒轻易说出口 提交于 2019-12-25 02:48:22

问题


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>


来源:https://stackoverflow.com/questions/30217016/adding-button-on-newly-created-tab

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!