javascript - Calling fnGetPosition on datatables.net throws "Cannot call method 'toUpperCase' of undefined" error -


i trying position of row in datatables using following code

var table = $('#userinformationtable').datatable(); var row_id = table.fngetposition($('#row_' + id)); table.fndeleterow(row_id); 

the $('#row_' + id) returning tr.

the fngetposition not work. getting error:

typeerror: cannot call method 'touppercase' of undefined

what doing wrong?

table.fngetposition(); expects dom node , you're passing jquery object. change from:

table.fngetposition($('#row_' + id));

to

table.fngetposition($('#row_' + id)[0]);


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -