jQuery UI Widgets Forums TreeGrid Treegrid contextmenu on window is not working

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 2 days, 14 hours ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • wpd
    Participant

    context menu for jqxtreegrid on model window is not displaying

    My treegrid is in modal window. I am trying to achieve the context menu for that treegrid. below is the code i am using.

    $(‘#jqxFileDownloadTree’).jqxTreeGrid({
    source: dataAdapter,
    filterable: true,
    columnsResize: true,
    icons: true,
    hierarchicalCheckboxes: true,
    checkboxes: true,
    height: ‘95%’,
    width: ‘100%’,
    columns: [
    { text: ‘File Group’, dataField: ‘elementName’}//,
    //{ text: ‘AO Parent’, dataField: ‘parentName’}//,
    //{ text: ‘value’, columnGroup: ‘Name’, dataField: ‘value’, width: 200 }
    ]
    });

    // create context menu
    var contextMenu = $(“#fileContextMenu”).jqxMenu({ width: 200, height: 58, autoOpenPopup: false, mode: ‘popup’ });
    $(“#jqxFileDownloadTree”).on(‘contextmenu’, function () {
    return false;
    });
    $(“#jqxFileDownloadTree”).on(‘rowClick’, function (event) {
    var args = event.args;

    if (args.originalEvent.button == 2) {
    console.log(args);
    var scrollTop = $(window).scrollTop();
    var scrollLeft = $(window).scrollLeft();
    console.log(contextMenu);
    console.log(scrollTop);
    console.log(scrollLeft);
    console.log(parseInt(event.args.originalEvent.clientX) + 5 + scrollLeft);
    console.log(parseInt(event.args.originalEvent.clientY) + 5 + scrollTop);
    contextMenu.jqxMenu(‘open’, 500, 0);
    return false;
    }
    });
    $(“#fileContextMenu”).on(‘itemclick’, function (event) {
    var args = event.args;
    var selection = $(“#jqxFileDownloadTree”).jqxTreeGrid(‘getSelection’);
    var rowid = selection[0].uid
    if ($.trim($(args).text()) == “Edit Selected Row”) {
    //$(“#jqxFileDownloadTree”).jqxTreeGrid(‘beginRowEdit’, rowid);
    } else {
    //$(“#jqxFileDownloadTree”).jqxTreeGrid(‘deleteRow’, rowid);
    }
    });


    Martin
    Participant

    Hello wpd,

    Most probably, this is an issue with the z-index of the jqxMenu.
    Try setting it with a larger number:
    var contextMenu = $("#fileContextMenu").jqxMenu({ width: 200, height: 58, autoOpenPopup: false, mode: 'popup', popupZIndex: 999999 });

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.