i don't know if is a bug,when change the oSettings.sAjaxSource,the next button is disabled?

i don't know if is a bug,when change the oSettings.sAjaxSource,the next button is disabled?

autojieautojie Posts: 2Questions: 0Answers: 0
edited October 2012 in DataTables 1.9
i change the oSettings.sAjaxSource of one datatables instance ,the other button is fine,but the next button is disabled,when i change the source like below ,the next button is fine again.
else if (mAction == "next") {
if (oSettings._iDisplayLength >= 0) {
/* Make sure we are not over running the display array */
if (parseInt(oSettings._iDisplayStart) + parseInt(oSettings._iDisplayLength) < parseInt(oSettings.fnRecordsDisplay())) {
oSettings._iDisplayStart += parseInt(oSettings._iDisplayLength);
}
}
else {
oSettings._iDisplayStart = 0;
}
}

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    If you change sAjaxSource, you'll need to get the data from the server again, otherwise DataTables can't know what is going on (you've changed a private variable without initiating any actions). Assuming you are using server-side processing - without a link or a debug trace its difficult to say for sure what the issue is.

    Allan
  • autojieautojie Posts: 2Questions: 0Answers: 0
    allan,thank you for your reply.my current application is the datatables form is fixed,and the content is getting from the server side.when i click one button from the client,datatables get data from the server side.but when i change the sAjaxSource,the next button is disabled or display the wrong number.(i change the source code like above,the datatable is fine),like my application,if you have any example ?i am beginner on using the datatable.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I'm afraid I don't know what is causing the problem, so I can't suggest a way to fix it. Can you please give me a link to the page?

    Allan
  • autojieautojie Posts: 2Questions: 0Answers: 0
    allan,thank you for you reply,i change the sAjaxSource,and the data is getting from the server again.my current application is the datatables form is fixed,and the data is dynamic get from the server,so when i change the sAjaxSource,the next button become disable or the wrong number.what can i do?please help!(i change the source code like above the datatable is fine)
This discussion has been closed.