jQWidgets Forums

jQuery UI Widgets Forums Grid jqxGrid incompatible with jQuery 3.5.

This topic contains 2 replies, has 2 voices, and was last updated by  ghenne 5 years ago.

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

  • ghenne
    Participant

    The following code works fine with jQuery 3.4.1, but not with jQuery 3.5

    {
        gedata = [];
        
        row = [];
        row["col0"] = "1";  
        row["col1"] = "2";  
        row["col2"] = "3";  
        gedata[0] = row;
           
        //user grid Settings
        datafieldsArray = [{ name: "col0", type: "text" }, { name: "col1", type: "text" }, { name: "col2", type: "text" }];       
        columnsArray = [{
           text: "Col 0",
           datafield: 'col0', 
           cellsalign: 'center',
           align: 'center',  
           width: "40%"      
        }, {
           text: "Col 1",
           datafield: 'col1', 
           cellsalign: 'center',
           align: 'center',  
           width: "40%"      
        },{   
           text: "Col 2",
           datafield: 'col2', 
           cellsalign: 'center',
           align: 'center',  
           width: "20%"      
        }] 
        source = 
        {
             localdata: gedata,
             datafields: datafieldsArray,
             datatype: "array"
        }; 
        
        adapter = new $.jqx.dataAdapter(source); 
    
        $("#Grid1").jqxGrid({
             //width: 800,
             theme: 'energyblue', 
             columnsheight: 25, 
             rowsheight: 28, 
             source: adapter,
             sortable: true,
             //selectionmode: 'singlecell',
             columns: columnsArray
        }); 
     
        console.log("END")
    }

    The error is on the $(“#Grid1”).jqxGrid({ statement. The message is

    Uncaught TypeError: Cannot convert object to primitive value
        at HTMLDivElement.<anonymous> (jqxgrid.js:8)
        at Function.each (jquery3.js:2)
        at c.<computed>._serializeObject (jqxgrid.js:8)
        at c.<computed>.propertyChangedHandler (jqxgrid.js:8)
        at Object.b.jqx.setvalueraiseevent (jqxcore.js:15)
        at Array.<anonymous> (jqxcore.js:15)
        at Function.each (jquery3.js:2)
        at Object.b.jqx.set (jqxcore.js:15)
        at Object.b.jqx.jqxWidgetProxy (jqxcore.js:15)
        at HTMLDivElement.<anonymous> (jqxcore.js:15)

    Hristo
    Participant

    Hello ghenne,

    I tested this demo below and it seems to work fine (just replace) the old jQuery version with the mentioned one (v3.5.1):
    https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/grid-grouping-aggregates.htm?light
    Please, provide us with one whole example that demonstrates this you could use the jseditor/jsfiddle for this purpose.
    Also, I would like to mention that the newer versions of the jQWidgets could work (separately) without the jQuery.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com


    ghenne
    Participant

    Updating to 3.5.1 solved the problem. Thank you!

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

You must be logged in to reply to this topic.