right click event
Paul Witmond
Hello,We have created a customize rule for filling and modifying an UDT
To do this we have (Michael thanks for your help :D ) created a new tab on the item master data etc etc.
This is working fine but now we want to be able to delete records from the udt and we would like to do this using the right-click event.
But we can use click/dbl click etc however when we use the rightclick event we see a standard SAP right click menu and our code is not getting anything.
Who has the solution ?
All we want is to delete a record using right click !
unknown
Have you already done this part?
// enables DeleteRow on the ContextMenu
SwissAddonFramework.UI.Components.Form o_f1 = null;
o_f1.EnableMenu("1293", true);
It will "delete" rows off the Grid by making them not visible.
Now you have two options:
1. Compare existing/visible records to the actual recordset and make necessary changes. I will not advise this if the Grid contains too many (100+) records.
2. Keep a track of all changes/deletes and change/delete only affected records. I have done it before and it works perfectly. But it (changing/removing records) will cost you about 2000~3000 lines of code. The events we talk about can not be set using Optimizer and needs to be coded in using SAPbouiCOM.MenuEvent.
Paul Witmond
Hi,Thanks for the idea but it's not working on a user tab
Regards,
Paul
unknown
Yes indeed, you are right about it (the non-working Delete Row context-menu).I would advise then to use Customizer's FunctionButton with NoButton option set to True. It's far easier to make it work, than to catch and handle menu events.
Your function button would have to look what (and if any) record is selected and handle accordingly. Besides that, the above mentioned record tracking and deletion will still apply.
Best Regards,
-
0
Please sign in to leave a comment.
Comments
0 comments