jQWidgets Forums

jQuery UI Widgets Forums Grid using jqxgrid inside the jqxwidow

This topic contains 1 reply, has 2 voices, and was last updated by  ivailo 10 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • using jqxgrid inside the jqxwidow #70405

    muthu
    Participant

    I’m using jqxgrid inside the jqxwidow,

    Here my code,,

    function publisherDetails(row){
    //view publishers details -> using subAgreement id from CapAgreement table and get the souce name from MasterSource table

    var subAgreementId = $(“#jqxgrid”).jqxGrid(‘getcellvalue’, row, “lca_subAgreement”);

    var source = {
    datatype: “json”,
    datafields: [
    { name: ‘lcms_lliSourceID’, type: ‘number’ },
    { name: ‘lcms_hierarchyID’, type: ‘string’ },
    { name: ‘lcms_source’, type: ‘string’ }
    ],

    cache: false,
    url: ‘index.php?rt=login/getPublishersDetails/’+subAgreementId,
    updaterow: function (rowid, rowdata, commit) {
    commit(true);
    }
    };
    var dataAdapter = new $.jqx.dataAdapter(source);

    var grid = $(“#publisherDetails”).jqxGrid(
    {
    width: 750,
    height: 560,
    source: dataAdapter,
    pageable: true,
    pagesize: 20,
    showfilterrow: true,
    columns: [
    { text: ‘First Name’, dataField: ‘lcms_source’, width: 250 },
    { text: ‘Last Name’, dataField: ‘lcms_source’, width: 250 },
    { text: ‘Product’, dataField: ‘lcms_source’, width: 250 }
    ]
    });

    //viewpublisherDetailsIcon the demo
    $(“#viewpublisherDetailsIcon”).jqxWindow({
    width: “auto”,
    height: “auto”,
    minWidth: 750,
    minHeight: 560,
    isModal: true,
    autoOpen: false,
    modalOpacity: 0.01,
    initContent: function () {
    grid
    }
    });

    $(“#subagreement”).text(subAgreementId);

    var x = ($(window).width() – $(“#viewpublisherDetailsIcon”).jqxWindow(‘width’)) / 2 + $(window).scrollLeft();
    var y = ($(window).height() – $(“#viewpublisherDetailsIcon”).jqxWindow(‘height’)) / 2 + $(window).scrollTop();
    $(“#viewpublisherDetailsIcon”).jqxWindow({ position: { x: x, y: y} });
    $(“#viewpublisherDetailsIcon”).jqxWindow(‘open’);

    }

    Now the problem is, if i choose pages size 5,10,20, it shows below error..,

    The data is still loading. When the data binding is completed, the Grid raises the ‘bindingcomplete’ event. Call this function in the ‘bindingcomplete’ event handler.

    Thanks,
    Muthu

    using jqxgrid inside the jqxwidow #70423

    ivailo
    Participant

    Hi Muthu,

    From this part of code is dificult to see the reason about this error.

    In code below you call a variable. Must be a function:

    initContent: function () {
    grid
    }

    Best Regards,
    Ivailo Ivanov

    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.