Skip to Content
author's profile photo Former Member
Former Member

Why there is no menu "Delete Row" display when I right click on my UDF?

Why there is no menu "Delete Row" display when I right click on my UDF? How to add it? Please let me know. Appreciate.

Ying Zhang

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Feb 20, 2008 at 04:03 PM

    in a user Matrix you have to program the rightclick remove line by yourself

    use the RightClickEvent for this:

    i give you a c# sample

            SAPbouiCOM.MenuItem oMenuItem = null;
            SAPbouiCOM.Menus oMenus = null;
            SAPbouiCOM.MenuCreationParams oCreationPackage = null;
    
            try
            {
                        if (eventInfo.BeforeAction == true)
                        {
                            oCreationPackage = ((SAPbouiCOM.MenuCreationParams)(globals.SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)));
    
                            oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING;
                            oCreationPackage.UniqueID = "DelRow";
                            oCreationPackage.String = "Zeile löschen";
                            oCreationPackage.Enabled = true;
    
                            oMenuItem = globals.SBO_Application.Menus.Item("1280"); // data'
                            oMenus = oMenuItem.SubMenus;
                            oMenus.AddEx(oCreationPackage);
                        }
                        else
                        {
    globals.SBO_Application.Menus.RemoveEx("DelRow");
    
            }        catch (Exception er)
            {
    
            }
            finally
            {
                oMenuItem = null;
                oMenus = null;
                oCreationPackage = null;
                GC.Collect();
            }
    

    what you have to do it is to catch the pval.menuid from the menuevent and remove it by yourself

    much luck 😊

    and when your are happy reward me 😊)

    regards

    David

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.