06-08-2017 11:33 AM
Is there a way to disable each of these buttons individually?
IE. Disable Add or Disable Copy or Disable Add and Disable.
05-01-2018 07:19 PM
Hi Bob,
Hope you are doing well - it's been a long time!!!
You can definitely drive the 'Delete' button using the 'Can Delete' attribute in CustomUI for this control. The 'Copy' can also be shown or hidden but it is static (can't drive its enable/disable feature using a property like you can for 'Delete'. Add will be enabled or disabled based on the subpart collection it is mapped to.
And of course, the other way to do it is use your own separate button for these 3 functions and drive them individually.
I know this is an old post and you've found the solution that works for you but just wanted to leave it out there for future reference.
Dharmesh
05-02-2018 08:13 AM
2 weeks ago
Hi DharmeshS,
I have an issue that is connected to this post. I am trying to figure out how to create my own action button that does exactly what the Delete button do, but without beeing bound to the triple button. I'm having a hard time figuring out a script in custom.vb that can remove, from the subpart connected to a grid, the selected part. Do you have any idea about how to do it? More generally speaking, is there a way to read the functions called by the default buttons in Custom UI?
Thanks
2 weeks ago
Hi Carico,
Yes, you can absolutely replicate the functionality of the individual buttons in ADD/COPY/DELETE combo...not only that but you can additional logic to those based on your unique situation. I am traveling now and don't have access to the exact snippet that removes a subpart but can you try this:
Dim _p As Object = <reference to some RS part object>
'remove the part from a subpart collection
_p.Owner.Remove(_p.ObjName)
The above code should do what you want. If it doesn't please let me know and I will find the correct code that does it.
Dharmesh