jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts

  • ali.kakhan
    Participant

    Hi Dimitar,

    Thank you, Its a small overlook but an expensive one, I really appreciate your assistance. It works fine as soon as I entered float : left in the main div of each button.

    thanks

    in reply to: N-Nested jqxgrids N-Nested jqxgrids #70393

    ali.kakhan
    Participant

    Hi all,
    I have managed to solve the problem.

    localdata:data[index][“_refListID”]

    in reply to: N-Nested jqxgrids N-Nested jqxgrids #70390

    ali.kakhan
    Participant

    I am currently having issue regarding nested jqxgrid. I am using JSON as a data source. I am getting empty nested grid. bellow is my code.

    var source =
    {
    datafields: [
    { name: ‘ID’, type: ‘string’ },
    { name: ‘ProductID’, type: ‘string’ },
    { name: ‘ProductNumber’, type: ‘string’ },
    { name: ‘ProductDesc’, type: ‘string’ },
    { name: ‘OwnerCompanyID’, type: ‘string’ },
    { name: ‘Status’, type: ‘string’ },
    { name: ‘Operation’, type: ‘string’ },
    { name: ‘Date’, type: ‘string’ },
    { name: ‘Comments’, type: ‘string’ }
    ],
    datatype: ‘json’,
    localdata: data

    };
    var adapter = new $.jqx.dataAdapter(source);

    var initrowdetails = function (index, parentElement, gridElement, record) {
    var id = record.uid.toString();

    var grid = $($(parentElement).children()[0]);

    var nestedSource =
    {
    datafields: [
    { name: ‘ProductREFID’, map: ‘ProductREFID’, type: ‘string’ },
    { name: ‘IngredientName’, map: ‘IngredientName’, type: ‘string’ },
    { name: ‘ID’, map: ‘ID’, type: ‘string’ }
    ],
    datatype: ‘json’,
    root: ‘_refListID’,
    async:true,
    localdata: data[index]._refListID

    };

    var nestedAdapter = new $.jqx.dataAdapter(nestedSource);
    if (grid != null) {
    grid.jqxGrid({
    source: nestedAdapter, width: 600, height: 200,
    columns: [
    { text: “ProductREFID”, datafield: “ProductREFID” },
    { text: “IngredientName”, datafield: “IngredientName” },
    { text: “ID”, datafield: “ID” }
    ]
    });
    }
    }
    // creage jqxgrid
    $(“#jqxgrid”).jqxGrid(
    {
    width: 670,
    height: 365,
    source: source,
    rowdetails: true,
    rowsheight: 35,
    initrowdetails: initrowdetails,
    rowdetailstemplate: { rowdetails: “<div id=’grid’ style=’margin: 10px;’></div>”, rowdetailsheight: 220, rowdetailshidden: true },
    ready: function () {
    $(“#jqxgrid”).jqxGrid(‘showrowdetails’, 1);
    },
    columns: [
    { text: ‘ID’, datafield: ‘ID’, width: 150 },
    { text: ‘ProductID’, datafield: ‘ProductID’, width: 150 },
    { text: ‘ProductNumber’, datafield: ‘ProductNumber’, width: 150 },
    { text: ‘ProductDesc’, datafield: ‘ProductDesc’, width: 150 },
    { text: ‘OwnerCompanyID’, datafield: ‘OwnerCompanyID’, width: 150 },
    { text: ‘Status’, datafield: ‘Status’, width: 150 },
    { text: ‘Operation’, datafield: ‘Operation’, width: 150 },
    { text: ‘Date’, datafield: ‘Date’, width: 150 },
    { text: ‘Comments’, datafield: ‘Comments’, width: 150 },
    ]
    });

    });

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