on Table load, Uncaught TypeError: Cannot read property '_iDisplayStart' of null

on Table load, Uncaught TypeError: Cannot read property '_iDisplayStart' of null

jeganjegan Posts: 5Questions: 0Answers: 0
edited September 2013 in Bug reports
i load the table once and close. again i reload the table, it get the following error!
Uncaught TypeError: Cannot read property '_iDisplayStart' of null.
I use Jquery.datable version 1.8.2



Many Thanks in Advance

Replies

  • jeganjegan Posts: 5Questions: 0Answers: 0
    $('#cropDetailsTable').dataTable({
    "bAutoWidth": false,
    "bJQueryUI": false,
    "bSort": false,
    "bPaginate": false,
    "bFind": false,
    "bDestroy": true,
    "bFilter": false,
    "bRetrieve":true,
    "aaData": [],
    "aoColumns": [
    { "sTitle": "Land/Soil Type", "mDataProp": "SoilType", "sWidth": "150px" },
    { "sTitle": "Intended Seeded Acres", "sWidth": "50px", "sHeight": "88px", "mDataProp": "Acres" },
    { "sTitle": "Production Insurance Coverage MT/Acre OR Coverage on Agri Stability", "mDataProp": "CoverageRate", "sWidth": "125px" },
    { "sTitle": "Edit",
    "sWidth": "50px",
    "fnRender": function () {
    var sReturn = "Edit";
    return sReturn;
    }
    },
    { "sTitle": "Delete",
    "sWidth": "50px",
    "fnRender": function (obj) {
    var sReturn = "Delete";
    return sReturn;
    }
    },
    ]
    });
    and it get error on fnUpdate
    function saveRow(oTable, nRow) {
    var jqInputs = $('input', nRow);
    if ((jqInputs[0].value != null && jqInputs[0].value != "Enter Soil Type here")
    && (jqInputs[1].value != "" && jqInputs[1].value != "Enter Acres here") && (jqInputs[2].value != "" && jqInputs[2].value != "Enter CoverageRate here")) {
    oTable.fnUpdate(jqInputs[0].value, nRow, 0, true,true);
    oTable.fnUpdate(jqInputs[1].value, nRow, 1, true,true);
    oTable.fnUpdate(jqInputs[2].value, nRow, 2, true,true);
    oTable.fnUpdate('Edit', nRow, 3, true,true);
    oTable.fnDraw();
    $('#showMessage').css('display', 'none');
    return true;
    }
    else {
    $('#showMessage').css("display", "block");
    return false;
    }

    }
  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin
    Please try the current release (1.9.4) as old releases are not supported. Please also link to a test case showing the problem

    Allan
  • jeganjegan Posts: 5Questions: 0Answers: 0
    edited September 2013
    yes i updated the version to 1.9 after updated now it show error on
    while add -> the datasource as empty.
    while Data table loads: Unknown parameter '1' from the datasource '0' and

    i load the table once and close. again i reload the table, it get the following error!
    Uncaught TypeError: Cannot read property 'aoCoulmns' of null.

    Many Thanks in advance
  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin
    As before, please link to a test case. I'm afraid I don't know what would be causing the problem you are seeing.
  • jeganjegan Posts: 5Questions: 0Answers: 0
    edited September 2013
    where i need to go, for link to test case. please give the URL




    Thanks In advance
  • jeganjegan Posts: 5Questions: 0Answers: 0
    edited September 2013
    yes i updated the version to 1.9, after updated now it shows error on
    while add -> the datasource as empty.
    while Data table loads: Unknown parameter '1' from the datasource '0' and

    i load the table once and close. again i reload the table and click on 'save', on 'oTable.fnupdate' it get the following error!
    Uncaught TypeError: Cannot read property 'aoCoulmns' of null.
    in link i attached only the code, can u figure any wrong in this..

    test link:http://jsfiddle.net/uvfPx/11/
  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin
    edited September 2013
    1. You have a trailing comma in aoColumns

    2. Two of the columns don't have a data property so DataTables assigns a default, which is what you are seeing for the unknown parameter. Use `mDataProp: null` and sDefaultContent - not fnRender (which is removed in the next version of DataTables) .

    3. Without a working test case I don't know what the problem with the reload is. Sorry.

    Allan
This discussion has been closed.