jQWidgets Forums

jQuery UI Widgets Forums Grid Uncaught Error: jqxGrid: Invalid column 'datafield' setting. jqxGri

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

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

  • walker1234
    Participant

    I am defining jqxgrid inside a function like the following:

    
     this.processID= function (collection_) {
    
       
    
            // Populate the count
            jQuery("#IDCount").html("(" + collection_.length + ")");
    
            var source =
               {
                   localdata: collection_,
                   datatype: "array"
               };
            var dataAdapter = new $.jqx.dataAdapter(source, {
                loadComplete: function (data) { },
                loadError: function (xhr, status, error) { }
            });
            $("#IDPanel").jqxGrid(
            {
                source: dataAdapter,
                width: '1000',
                columns: [
                  { text: 'Location', datafield: 'Description' },
                  { text: 'Type', datafield: 'IDTypeDescription' },
                  { text: 'Start', datafield: 'startDate' },
                  { text: 'End', datafield: 'endDate' },
                  { text: 'ID ', datafield: '',width:150 },
                  { text: 'Defined Attributes', datafield: '', width:150}
                ]
            });
            $("#IDPanel").jqxGrid({ height: 150 });
    
        };
    

    I am getting the following error in the console:

    datafield

    Question #1: How should I define unique datafield ? the above code was working on V2.7 but on v4.1.2, it’s giving me the error as shown above.

    Question #2:Another question, why does j1x-all.js take lot of time to load if I try to open it?


    Hristo
    Participant

    Hello walker1234,

    #1: This happen when you have two or more datafields with same name.
    Need to change name (give name) for datafield in ‘ID’ and for ‘Defined Attributes’.

    2#: jqx-all.js is minified file. This file is with data compression and contain all widgets on one row.
    Hint: If you would like to debugging could include separately files with used widgets only.

    Best Regards,
    Hristo Hristov

    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.