Can use aDataSort with mDataProp (mDataProp not a function) ?

Can use aDataSort with mDataProp (mDataProp not a function) ?

jinjungjinjung Posts: 24Questions: 0Answers: 0
edited April 2012 in DataTables 1.9
Hello,
For all my pages, using aDataSort with mDataProp has no effect. The sorting is always on the click sorting column.
[code]
"aoColumnDefs": [
{
"sTitle": "+",
"mDataProp": null,
"bSortable" : false,
"bSearchable": false,
"sClass": "center row_detail",
"sDefaultContent": '',
"aTargets": [ 0 ],
"sWidth": 20
},
{ "sTitle": "foo", "mDataProp": "name_foo", "aTargets": [ 1 ], "aDataSort": [ 1, 2 ] },
{ "sTitle": "bar", "mDataProp": "name_bar", "aTargets": [ 2 ] },
{ "sTitle": "baz", "mDataProp": "name_baz", "aTargets": [ 3 ] }

],
[/code]
(tests with DT 1.9.0), Jinjung.

Replies

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    I've just put this example together which shows it working as expected: http://live.datatables.net/apehix/edit#javascript,html . Can you link to test cause which shows the failure if you are still having problems with this, so I can reproduce and fix it?

    Thanks,
    Allan
  • jinjungjinjung Posts: 24Questions: 0Answers: 0
    Thank you for your response Allan, but I cannot check your exemple because he dosen't work, even if I change DT lib version.

    JS error :
    "NetworkError: 404 Not Found - http://live.datatables.net/apehix/sources/objects.txt?_=1334927136838"
    or
    "NetworkError: 404 Not Found - http://live.datatables.net/release-builds/jquery.datatables.1.9.0.js"
  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Ah sorry - it just needs a slash at the start of the path: http://live.datatables.net/apehix/2/edit

    Allan
This discussion has been closed.