Trouble using Custom API function fnLengthChange()
Trouble using Custom API function fnLengthChange()
I tried to simply add a call to tfnLengthChange() as shown in the example for the function, in my code below (which works without that call). But I get the error:
Result of expression 'usersTable.fnLengthChange' [undefined] is not a function.
What am I missing??
[code]
var usersTable;
var aDataSet7;
var loaduserstablecallback = function(data)
{
aDataSet7 = data;
$(document).ready(function() {
$('#dynamictusers').html( '' );
usersTable = $('#userstable').dataTable( {
"aaData": aDataSet7,
"aoColumns": [
{ "sTitle": "UserKey" , "bVisible": false , "bSearchable": false},
{ "sTitle": "Login"},
{ "sTitle": "LastName" },
{ "sTitle": "FirstName" },
{ "sTitle": "SSN" },
{ "sTitle": "AddrKey" , "bVisible": false , "bSearchable": false },
{ "sTitle": "Phone" },
{ "sTitle": "Cell" },
{ "sTitle": "Email" }
]
} );
usersTable.fnLengthChange( 4 );
$("#userstable tbody").click(function(event) {
$(usersTable.fnSettings().aoData).each(function (){
$(this.nTr).removeClass('row_selected');
});
$(event.target.parentNode).addClass('row_selected');
});
} );
[/code]
Thanks in advance
--Ken
Result of expression 'usersTable.fnLengthChange' [undefined] is not a function.
What am I missing??
[code]
var usersTable;
var aDataSet7;
var loaduserstablecallback = function(data)
{
aDataSet7 = data;
$(document).ready(function() {
$('#dynamictusers').html( '' );
usersTable = $('#userstable').dataTable( {
"aaData": aDataSet7,
"aoColumns": [
{ "sTitle": "UserKey" , "bVisible": false , "bSearchable": false},
{ "sTitle": "Login"},
{ "sTitle": "LastName" },
{ "sTitle": "FirstName" },
{ "sTitle": "SSN" },
{ "sTitle": "AddrKey" , "bVisible": false , "bSearchable": false },
{ "sTitle": "Phone" },
{ "sTitle": "Cell" },
{ "sTitle": "Email" }
]
} );
usersTable.fnLengthChange( 4 );
$("#userstable tbody").click(function(event) {
$(usersTable.fnSettings().aoData).each(function (){
$(this.nTr).removeClass('row_selected');
});
$(event.target.parentNode).addClass('row_selected');
});
} );
[/code]
Thanks in advance
--Ken
This discussion has been closed.
Replies