Getting error Unable to get value of the property 'mData': object is null or undefined

Getting error Unable to get value of the property 'mData': object is null or undefined

sayedfarhan1sayedfarhan1 Posts: 8Questions: 6Answers: 0
edited July 2014 in Free community support

When i am binding my table with datatable plugin it give error 'mData' object is null or undefine.
i have changed datatable plugin version from 1.4.0 to 1.10.0.
On 1.4.0 version it was working fine

<link href="Styles/jquery.dataTables.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="Scripts/jquery.dataTables.js"></script>

$(document).ready(function () { $('#Systable').dataTable(); });

This question has an accepted answers - jump to answer

Answers

  • xmojmrxmojmr Posts: 18Questions: 2Answers: 3
    Answer ✓

    You will have to upgrade your application. DataTables version 1.10 is not completely backward compatible. New recommended constructor is DataTable with uppercase D, read carefully upgrade instructions at https://datatables.net/upgrade

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    In fairness, the $().dataTable() construct does still work and still returns a jQuery instance with the old style fn* DataTables methods. Use $().DataTable() if you want to access the new API. 1.10 should be fully backwards compatible minus infinite scrolling and the fnRender option, both of which were removed.

    Regarding the issue, did changing to $().DataTable() fix it? I'd be surprised and very interested to see a test case showing that if so please, so I can make sure everything is working as it should.

    Allan

This discussion has been closed.