how to change lengthMenu of 2 tables at the same time

how to change lengthMenu of 2 tables at the same time

Rectec013Rectec013 Posts: 42Questions: 10Answers: 0

Hello ,
i have two tables on the same Display with different column names . i want to change both lengthMenu at the same time .
Thanks

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin
    Answer ✓

    Set a default.

    Allan

  • Rectec013Rectec013 Posts: 42Questions: 10Answers: 0

    thanks Allan .
    I want to change manually the lenghtMenu from one table , and the other table should automatically do the same thing .
    Table A , LenghtMenu 50 .
    Table B , LenghtMenu 50 .
    using Default setting means making a standard configuration for Table 1 and Table 2 .

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin
    Answer ✓

    Oh I see - sorry, I didn't understand that point before. Listen for the length-change event on your tables and then use the API for the other table to change its page length to match - page.len(). You'll need a little condition to make sure you don't end up with an infinite loop!

    Allan

  • Rectec013Rectec013 Posts: 42Questions: 10Answers: 0

    thanks for help .
    the first link is dead :) do you have an example for that ?

  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,947
    Answer ✓

    I think Allan meant the length event.

    Kevin

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    My bad - I did :).

  • Rectec013Rectec013 Posts: 42Questions: 10Answers: 0

    thanks guys

This discussion has been closed.