jQuery UI Widgets Forums Grid All Data in JSON string being listed under one column

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 4 months ago.

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

  • Spades1234
    Participant

    Hey all!

    I’m a bit new to the JQX ControlSet, but they look great so far! My problem is that I have a grid configured, its being populated by a JSON string (which has been checked and is in good form). When running it, all the columns are formed properly (headers, footers etc), but all the data goes under the first column? I looked through the documentation and all seems fine, perhaps someone else can spot an error?

    // COnfigure data source,…
    var LocationDataSource =
    {
    datatype: “json”,
    datafields: [
    { name: ‘Date’ },
    { name: ‘ProductCode’ },
    { name: ‘StoreNum’ },
    { name: ‘ProductQty’, type: ‘int’ }
    ],
    localdata: LocationData
    };

    // Apply data source to grid,…
    $(“#jqxLocationGrid”).jqxGrid(
    {
    //width: 900,
    source: LocationDataAdapter,
    pageable: true,
    //rowsheight: 50,
    autoheight: true,
    sortable: true,
    altrows: true,
    enabletooltips: true,
    selectionmode: ‘multiplecellsadvanced’,
    columns: [
    { text: ‘Date’, datafield: ‘Date’, width: 250 },
    { text: ‘Product Code’, datafield: ‘ProductCode’, width: 250 },
    { text: ‘Store Number’, datafield: ‘StoreNum’, width: 250 },
    { text: ‘Product Qty’, datafield: ‘ProductQty’, width: 250 }
    ]
    });


    Dimitar
    Participant

    Hello Spades1234,

    This code is insufficient for us to determine the source of your issue. We would also need a sample of your JSON data source and your data adapter (LocationDataAdapter) definition. Please remember to format your code by selecting it and pressing the code button from the toolbar. If you wish, you can share a JSFiddle example we can test directly.

    Best Regards,
    Dimitar

    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.