sDom incompatible with sAjaxSource

sDom incompatible with sAjaxSource

atlas3650atlas3650 Posts: 11Questions: 0Answers: 0
edited July 2009 in General
Hi Allan,

I have tried to use ajax to load up a big table. It looks like:
[code]
var allQuestionsTable = $('#allQuestionsTable').dataTable( {
"bFilter" : false,
"iDisplayLength" : 5,
"oLanguage" : {
"sInfo" : "_START_-_END_ of _TOTAL_ questions" },
"bLengthChange" : false,
"bPaginate" : true,
"sPaginationType" : "two_button",
"sAjaxSource" : 'allquestions_json',
"sDom": '<"pager"pi>t',
"bProcessing" : true,
"aoColumns" : [ { "bSortable" : true }, // category
{ "bSortable" : true }, // question
{ "bSortable" : true }, // answers
{ "bSortable" : false } // control links
]
});
[/code]
This fails with the following error:
[code]
oSettings.anFeatures.r is undefined (line 2731)
[/code]
This is datatables_1.5.0beta9.

If you turn off sDom, it works, so I know my ajax source is ok; but that's not good for me, I need to place the pager at the top of the table.

Is this a bug or am I doing something wrong?

Thanks!

Replies

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    Hi atlas3650,

    I think this it's anything to do with the Ajax source (although that does make the problem show up due to the need to show the processing element) - but rather the problem is here:

    [code]
    "sDom": '<"pager"pi>t',
    "bProcessing" : true,
    [/code]
    You've got processing enabled, but you haven't not the processing element in sDom ('r'). Just including that in your parameter should solve the problem.

    Regards,
    Allan
This discussion has been closed.