Change event of the number of page dropdown in paging

Change event of the number of page dropdown in paging

Deepak167Deepak167 Posts: 2Questions: 0Answers: 0
edited September 2013 in General
Can i handle the change event when I select other value from the dropdown of the pagination. I am using the following code for paging:


$('table#SearchObservation').dataTable({
"aLengthMenu": [[10, 25, 50, 100], [10, 25, 50, 100]],
"iDisplayLength": 10,
"bFilter": false,
"bInfo": false,
"sDom": 'l',
//"sDom": '<"top"i>lt<"bottom"pf>',
"sPaginationType": "full_numbers",
"bJQueryUI": false,
"oLanguage": {
"sLengthMenu": "View Per Page _MENU_ "
},
"aoColumnDefs": [
{ 'bSortable': true, 'aTargets': [0]}]
});

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You can add another `change` event to the select in just the standard jQuery way, but you would need to unbind the DataTables one if you want to intercept and manipulate that.

    Allan
  • Deepak167Deepak167 Posts: 2Questions: 0Answers: 0
    Hi allan,

    thanks for your suggestion.
    I have added the following code to the dataTable, but didn't get any result

    "change": function (event, ui) {
    debugger;
    alert("Hello");
    }

    I don't want to unbind the dataTable.

    Deepak
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Please link to a page showing the error. That looks like it would work if added correctly.

    Allan
This discussion has been closed.