jQWidgets Forums

jQuery UI Widgets Forums TreeGrid Maximum call stack size exceeded Error

This topic contains 6 replies, has 2 voices, and was last updated by  Peter Stoev 9 years, 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Maximum call stack size exceeded Error #77630

    rasoul_par
    Participant

    Hi there,
    I’m using jqxTreeGrid for my project. My tree has maximum 5 levels.
    I’m using updaterow event for updating a row’s data. but I face this error!
    this is the code:
    var source = {
    datatype: ‘json’,
    datafields: [
    { name: ‘id’, type: ‘int’, align: ‘left’},
    { name: ‘name’, type: ‘string’, align: ‘left’},
    { name: ‘code’, type: ‘string’ , align: ‘left’}
    ],
    timeout: 10000,
    id: ‘code’,
    root: ‘rows’,
    url: url,
    updaterow: function (rowid, rowdata, commit) {
    var data = rowdata;
    try {
    var jqxhr = $.post(‘updateSample.php’, {
    data: rowdata
    }, function () {
    // do something
    });
    }
    catch (error) {
    console.log(error.message);
    }
    }
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    $(“#jqxgrid”).jqxTreeGrid({
    width: 900,
    source: dataAdapter,
    pageable: true,
    sortable: true,
    editable: true,
    theme: ‘darkblue’,
    columns: [
    { text: ‘Id’, datafield: ‘id’, cellsAlign: ‘left’, pinned: true, editable: false},
    { text: ‘Name’, datafield: ‘name’, cellsAlign: ‘center’},
    { text: ‘Code’, datafield: ‘code’, cellsAlign: ‘center’},
    ],
    virtualModeCreateRecords: function (expandedRecord, done) {
    var dataAdapter = new $.jqx.dataAdapter(source,
    {
    formatData: function (data) {
    if (expandedRecord == null) {
    data.parentId = -2
    }
    else {
    data.parentId = expandedRecord.code
    }
    return data;
    },
    loadComplete: function()
    {
    done(dataAdapter.records);
    },
    loadError: function (xhr, status, error) {
    done(false);
    }
    }
    );
    dataAdapter.dataBind();
    },
    virtualModeRecordCreating: function (record) {
    // do something
    },
    });

    Maximum call stack size exceeded Error #77632

    Peter Stoev
    Keymaster

    Hi rasoul_par,

    Provide, please jsfiddle.net sample which demonstrates your issue. Also, why do you set parentId? I don’t suggest you to do that.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Maximum call stack size exceeded Error #77639

    rasoul_par
    Participant

    I’m not doing anything more than php integration demo.
    If I use plain javascript or aja.js ajax and it fixed.

    Thanks for your quick response and great widgets!

    Maximum call stack size exceeded Error #77640

    Peter Stoev
    Keymaster

    Hi rasoul_par,

    We do not have such demo about TreeGrid and we don’t set parentId property in our TreeGrid demos when Data Records are loaded on demand. Please, provide jsfiddle.net demo if you would like our team to test your scenario.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Maximum call stack size exceeded Error #77645

    rasoul_par
    Participant

    Hi Peter,
    I’ll provide a demo and inform you.
    Sorry for delay.

    Maximum call stack size exceeded Error #77674

    rasoul_par
    Participant

    Hello there,
    sorry for being late, the jsfiddle is here.
    I’m using Symfony 2.7 as my php framework.
    when i replace jquery post function by aja.js ajax functions, the error vanishes.
    Thanks.

    Maximum call stack size exceeded Error #77680

    Peter Stoev
    Keymaster

    Hi rasoul_par,

    Please, check whether you Add Records with unique ID/Key. That exception is raised by jqxTreeGrid and is raised in your sample. I also noticed that your keyDataField and parentDataField are the same. Should they be? I think that they should be different.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.