Cannot get sort to work at all, table headers not clickable

Cannot get sort to work at all, table headers not clickable

vincentlepesvincentlepes Posts: 2Questions: 0Answers: 0
edited December 2011 in DataTables 1.8
I'm working DataTables into a prototype for a search results table...I'm using a static table at the moment, as there's no dynamic data to connect to just yet. I've put numbers in some columns for a test run, and I just can't get sorting to work. Neither initial sorting nor clickable headers are working, and I just can't figure out what I'm doing wrong! I'm using jQuery 1.6.2 with jQuery UI 1.8 (I forget which exact version of jQuery UI as the JS file says @VERSION where it should tell me in the comments). I commented out a sample subheading, I'm not sure how to group rows yet in case anyone wonders what the commented line is about.

Any help is greatly appreciated :).

Here's my init:
[code] $('#results table').dataTable({
"aaSorting": [[ 5, "asc" ]],
"aoColumns": [
{ "bSortable": false },
null,
null,
null,
null,
null,
null,
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
],
"bStateSave": true,
"bPaginate": false,
"bLengthChange": false,
"oSearch": false,
"sScrollY": "800px",
"bProcessing": true
});[/code]

And here's my test table (so far):

[code]

Compare
Name
Part #
Quality
Wty.
Availability
Price
Qty.
Cart
 
 


<!--
Brake Pads: Front (10 Results)
-->

1
1
1
2
3
3
19.99
0
0
0
0


1
2
3
3
2
1
25.99
0
0
0
0


1
3
2
1
1
2
29.95
0
0
0
0


1
1
1
2
3
3
19.99
0
0
0
0


1
2
3
3
2
1
25.99
0
0
0
0


1
3
2
1
1
2
29.95
0
0
0
0


1
1
1
2
3
3
19.99
0
0
0
0


1
2
3
3
2
1
25.99
0
0
0
0


1
3
2
1
1
2
29.95
0
0
0
0


[/code]

Replies

  • fobosfobos Posts: 14Questions: 0Answers: 0
    $('#results').dataTable({
    "aaSorting": [[ 5, "asc" ]],
    "aoColumns": [
    { "bSortable": false },
    null,
    null,
    null,
    null,
    null,
    null,
    { "bSortable": false },
    { "bSortable": false },
    { "bSortable": false },
    { "bSortable": false }
    ],
    "bStateSave": true,
    "bPaginate": false,
    "bLengthChange": false,
    "oSearch": false,
    "sScrollY": "800px",
    "bProcessing": true
    });
  • vincentlepesvincentlepes Posts: 2Questions: 0Answers: 0
    I forgot to mention that #results is a div wrapping the table, targeting it directly produces an error. Other than that, your code produces the same results...thanks anyway. I'll post an example today, if it helps :). I'm starting to think something else is awry.
This discussion has been closed.