Results 1 to 2 of 2

Thread: custom menu items

  1. #1

    Default custom menu items

    hi there, i'm trying to make a server side structure to be used as a client side menu item

    server side
        public struct ContextMenuItem
            public string text;
            public string handler;

    client side
    var itemmenu_custom = new;
    if (record.get('contextmenu') != null)
              for(var ctr = 0; ctr < record.get('contextmenu').length; ctr++)
                  itemmenu_custom.add({text:record.get('contextmenu')[ctr].text, handler:new Function(record.get('contextmenu')[ctr].handler)});
    the menu is showing up but the handler is not firing, what am i missing, and also how can i add multiple handlers per menu item?

  2. #2


    got the answer from this one

    used this code instead
    itemmenu_custom.add({text:record.get('contextmenu')[ctr].text, handler:eval("record.get('contextmenu')[ctr].handler = "+ record.get('contextmenu')[ctr].handler)});
    but how can i add multiple event listener from the server side since this is only adding the click event handler?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts