Aybody know the syntax??
Aybody know the syntax??
if I want to make a few rows invisable and make a few rows unsortable is this the syntax
[code]
$(document).ready(function() {
$('#example').dataTable( {
"aoColumns": [
{ "bVisible": false },
null,
null,
null,
{ "bVisible": false },
],
"aoColumns": [
{ "bSortable": false },
null,
{ "bSortable": false },
null,
null
]
} );
} );
[/code]
is this code okay
I thought that was the syntax but it fails
any Ideas
[code]
$(document).ready(function() {
$('#example').dataTable( {
"aoColumns": [
{ "bVisible": false },
null,
null,
null,
{ "bVisible": false },
],
"aoColumns": [
{ "bSortable": false },
null,
{ "bSortable": false },
null,
null
]
} );
} );
[/code]
is this code okay
I thought that was the syntax but it fails
any Ideas
This discussion has been closed.
Replies
The code you posted refers to aoColumns - which is used for columns - not rows :-). Also it is expected that there is only one definition of aoColumns - I'm not sure what would happen if you define it twice - probably a Javascript error.
Perhaps you are looking for:
[code]
$(document).ready(function() {
$('#example').dataTable( {
"aoColumns": [
{ "bVisible": false, "bSortable": false },
null,
{ "bSortable": false },
null,
{ "bVisible": false },
]
} );
} );
[/code]
If it is actually rows rather than columns you want to make non-sortable and hidden, then I'm afraid you are out of luck. It's possible using the API to do that, but it's a lot more complicated (you would need custom filtering).
Allan
I'm gonna try that
I come from a AS3 programming background i'm just now learning ajax and jquery
O' i actually did mean columns Oops.
I'll try this and post back if it works
thanx
thanks
I'm using Datatables with server a mysql database and I love it