How to unable create a new record button from sub grid

爱⌒轻易说出口 提交于 2019-12-11 23:03:47

问题


I want to prevent create a new record from my sub-grid of email entity (it's a custom view/subgrid), I tried to change it using ribbon workbench -> sub-grid ribbon, but I have many views to my Entity.

How do I know that I'm working on the right addnew button and not on unwanted subgrid or by mistake deleting the addnew button from all of my sub-grids?


回答1:


From ribbon workbench or directly in ribbondiff xml, you can hide the (+) Add New button in all subgrids of that particular entity when customizing entity ribbon. It’s nothing to do with selected custom view or any particular form.

Make sure you hide the + ADD NEW {0} button with CommandCore AddNewRecordFromSubGridStandard. Other one, + NEW{0} button is used within associated view.

Hide it so you can Unhide it again. Don’t delete it.

If you want to hide for some particular scenario, then probably some unsupported DOM manipulation can hide it in subgrid onload js.




回答2:


In version 8.1 the selector for the commands of a subgrid is '#titleContainer_SUBGRIDNAMEHERE a'.

If you try to do it OnLoad, I suggest you use setInterval to accomodate for the form load times (subgrids are loaded asynchronously).



来源:https://stackoverflow.com/questions/49627030/how-to-unable-create-a-new-record-button-from-sub-grid

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