jQuery UI Widgets Forums Grid Grid inside jqxWindows freezed

This topic contains 5 replies, has 2 voices, and was last updated by  yllsuarez 10 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Grid inside jqxWindows freezed #66548

    yllsuarez
    Participant

    Hi, there !!

    I have a grid and when select a row open a jqxWindows with other grid inside.

    All is going fin untill close the jqxWindows and open the jqxWindows from other row. The Windows open, but the grid dont allow me select nothing.

    Grid inside jqxWindows freezed #66573

    Dimitar
    Participant

    Hello yllsuarez,

    Please make sure you initialize the grid in the window in the jqxWindow’s initContent callback function. This way, you can avoid unexpected behaviour.

    Best Regards,
    Dimitar

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

    Grid inside jqxWindows freezed #66714

    yllsuarez
    Participant

    Hi Dimitar,

    I don’t know exactly where initialize the jqWindow. I need send some parameters in order to build the jqGrid inside the jqWindow.

    I am defining the jqWindow in the ready() function as follow:
    $(“#popupWindow”).jqxWindow({ width: 600, height: 400, isModal: true, autoOpen: false, cancelButton: $(“#Cancel”), modalOpacity: 0.01 });

    So, the popupWindow is called through this function:
    function ShowRowDetails(typeTask, dataRecord) {
    BuildReportedGrid( typeTask, dataRecord);
    $(“#popupWindow”).jqxWindow(‘show’);
    }

    In BuildReportedGrid I populated a grid, that, as I said before the first show the real data, after that never refresh or repaint the jqWindows.

    Grid inside jqxWindows freezed #66747

    Dimitar
    Participant

    Hi yllsuarez,

    Here is what we suggest:

    $("#popupWindow").jqxWindow({
        width: 600,
        height: 400,
        isModal: true,
        autoOpen: false,
        cancelButton: $("#Cancel"),
        modalOpacity: 0.01,
        initContent: function() {
            // initialize the grid here (with empty data if initial data is not known)
        }
    });
    
    function ShowRowDetails(typeTask, dataRecord) {
        // update the grid's data here (by setting its source or calling updatebounddata). Do not call the grid initialization code here
        BuildReportedGrid(typeTask, dataRecord);
        $("#popupWindow").jqxWindow('show');
    }

    Best Regards,
    Dimitar

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

    Grid inside jqxWindows freezed #66775

    yllsuarez
    Participant

    Hi Dimitar, thanks a lot for ur time.

    I follow your suggestion, but the grid is still showed the first time nice, but the others time that is called the data is not refreshed.

    I am using the code below,

    $(“#MenuTasks”).on(‘itemclick’, function (event) {
    var args = event.args;
    var rowindex = $(“#assignedtask”).jqxGrid(‘getselectedrowindex’);
    var dataRecord = $(“#assignedtask”).jqxGrid(‘getrowdata’, rowindex);

    switch ( $.trim($(args).text()) ) {
    case “Edit Tasks Reported”:
    BuildReportedGrid( “Task”, dataRecord);
    $(“#popupWindow”).jqxWindow(‘show’);
    break;
    case “New Task Report”:
    NewWSWindows(“Task”, dataRecord);
    break;
    }
    });

    //Initialize PopMenu for grids
    $(“#popupWindow”).jqxWindow({
    width: 600, height:
    400, resizable: true,
    isModal: true,
    autoOpen: false,
    cancelButton: $(“#Cancel”),
    modalOpacity: 0.01,
    animationType: ‘fade’,
    initContent: function() {
    $(“#reportedgrid”).jqxGrid({
    width: 550,
    //source: weeklysource,
    autoHeight: true,
    sortable: true,
    showstatusbar: true,
    statusbarheight: 50,
    showfilterrow: true,
    filterable: true,
    showaggregates: true,
    selectionmode: ‘singlerow’,
    columns: [
    { text: ‘ID’, datafield: ‘id’},
    { text: ‘Task’, datafield: ‘title’, columntype: ‘textbox’, filtertype: ‘input’, width: 400 },
    { text: ‘Report’, datafield: ‘effort’ , cellsalign: ‘right’ , width: 90 , aggregates: [‘sum’]}
    ]
    });
    }
    });

    function BuildReportedGrid( reportype, datarow) {

    var currentws = _.where(myweekly, { updtype: reportype, title: datarow.title} );

    var weeklysource = {
    localdata: currentws,
    datafields:
    [
    { name: ‘id’ , type: ‘number’ },
    { name: ‘title’, type: ‘string’ },
    { name: ‘effort’ , type: ‘number’ }
    ],
    datatype: “array”
    };

    $(“#reportedgrid”).jqxGrid({ source: weeklysource });

    }

    Grid inside jqxWindows freezed #66777

    yllsuarez
    Participant

    Dimitar, when include an Adapter instead of the array source all became clear.

    Thanks a lot.

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

You must be logged in to reply to this topic.