javascript - DataTable Uncaught TypeError: Cannot read property 'cell' of undefined -
i have datatable local data consisting of 8 headers/rows. i'm getting uncaught typeerror: cannot read property 'cell' of undefined. did investigation , if comment out 1 of columns not getting error anymore. seems table can show 7 rows. know how fix this?
<tr> <th class="surname">surname</th> <th class="firstname">first name</th> <th class="loginemail">login email</th> <th class="customer">customer</th> <th class="capabilities">capabilities</th> <th class="currentstatus">status</th> <th class="lastinvitesent">last email sent</th> <th class="removereq"></th> </tr>
data
data.loginemail = img.attr('data-email'); data.firstname = img.attr('data-firstname'); data.surname = img.attr('data-surname'); data.customer = img.attr('data-customer'); data.roles = img.attr('data-roles'); data.currentstatus = img.attr('data-status'); data.lastinvitesent = img.attr('data-lastemailsent'); data.removereq= img.attr('data-removereq');
code
$('table.data-edit-invitations').datatable({ "sdom": '<"top">rtipl', "bpaginate": false, "spaginationtype": "full_numbers", "sscrolly": "345px", "bscrollcollapse": true, "bfilter": false, "bsort": false, "bsortcellstop": false, "aocolumns": [ { "stype": 'string-case', "sclass": 'surname', "mdata": "surname"}, { "stype": 'string-case', "sclass": 'firstname', "mdata": "firstname"}, { "stype": 'string-case', "sclass": 'loginemail', "mdata": "loginemail"}, { "stype": 'string-case', "sclass": 'customer', "mdata": "customer"}, { "stype": 'string-case', "sclass": 'capabilities', "mdata": "roles" }, { "stype": 'string-case', "sclass": 'currentstatus', "mdata": "currentstatus" }, { "stype": 'string-case', "sclass": 'lastinvitesent', "mdata": "lastinvitesent" }, { "stype": 'string-case', "sclass": 'removereq', "mdata": "removereq" } ], "olanguage": { "semptytable": '<span>no data available</span>', "sprocessing": "<span>processing</span>" }, "bprocessing": true, "fndrawcallback": function () { //some code here });
ps: when comment out removereq in header , aocolumn. works. when comment out lastinvitesent , uncomment removereq works. not working when both exist!
Comments
Post a Comment