jQuery UI Widgets Forums Grid Grid – No Data Display

This topic contains 8 replies, has 3 voices, and was last updated by  Dimitar 9 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Grid – No Data Display #54670

    lineker
    Participant

    Hi Peter,

    I know that this is very common problem but unfortunately I could not find the reason from recent topics
    Although there is json data, it says ‘No Data To Display’ at grid.
    My code is very simple. It is below. It is sure there is json data,

    var url = ‘/msa/stores2?cmd=json_product_rec’;

    // prepare the data
    var sourceGrid = {
    datatype: “json”,
    datafields: [
    { name: ‘RecordID’ },
    { name: ‘RecordDate’},
    { name: ‘Branch’ }
    ],
    root: “Products”,
    record: “Product”,
    id: ‘RecordID’,
    url: url,
    beforeprocessing: function(data) {
    sourceGrid.totalrecords = data.total;
    }
    };

    dataAdapterGrid = new $.jqx.dataAdapter(sourceGrid, {
    downloadComplete: function (data, status, xhr) { },
    loadComplete: function (data) { alert(“data”.data);},
    loadError: function (xhr, status, error) { alert(“error”.error); },
    });

    $(“#gridpricerecords”).jqxGrid( {
    width: 200,
    source: dataAdapterGrid,
    autoheight: true,

    columns: [
    { text: ‘RecordDate’, datafield: ‘RecordDate’ },
    { text: ‘Branch’, width: 120, height: 130, datafield: ‘Branch’ }
    ]
    });

    • This topic was modified 10 years, 1 month ago by  lineker.
    Grid – No Data Display #54680

    lineker
    Participant

    Hi Peter,

    I am also sending json demo data.
    I can see that it reaches to grid because when I alerted (data.total at beforeprocessing function) number of record I see ‘5’ at popup

    {“success”:true,”prd_rec”:[{“B.Branch”:”Ankara”,”R.RecordDate”:”2014-04-22″,”R.RecordID”:”308″},{“B.Branch”:”Ankara”,”R.RecordDate”:”2014-04-22″,”R.RecordID”:”309″},{“B.Branch”:”Ankara”,”R.RecordDate”:”2014-04-22″,”R.RecordID”:”310″},{“B.Branch”:”Ankara”,”R.RecordDate”:”2014-04-22″,”R.RecordID”:”311″},{“B.Branch”:”Ankara”,”R.RecordDate”:”2014-04-22″,”R.RecordID”:”312″}],”total”:5}

    Grid – No Data Display #54693

    lineker
    Participant

    Hi Peter,

    I found problem.
    I removed following ones and it worked

    root: “Products”,
    record: “Product”,

    Grid – No Data Display #69579

    Dimitar
    Participant

    Hello digikv,

    These demos work fine on our side. Did you install the version of the Northwind database included in the phpdemos folder? What server do you run the examples on?

    Best Regards,
    Dimitar

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

    Grid – No Data Display #69614

    Dimitar
    Participant

    Hi digikv,

    Are there any errors thrown in your browser console when running the examples?

    Best Regards,
    Dimitar

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

    Grid – No Data Display #69840

    Dimitar
    Participant

    Hi digikv,

    If you cannot run the examples, you can try recreating them by following the tutorials in the PHP Integration section of the Documentation, such as Bind jQuery Grid to MySql Database using PHP. You can also use the online PHP demos as a reference.

    Best Regards,
    Dimitar

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

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

You must be logged in to reply to this topic.