fnDrawCallback not called on display length change

fnDrawCallback not called on display length change

rbenedetrbenedet Posts: 2Questions: 0Answers: 0
edited December 2013 in General
Hello,
I initialize a static empty datatable with an fnDrawCallback to bind buttons for each row so that when the user clicks on this button, it gets details about this particular row.
On this table, I manually update the data with fnClearTable/fnAddData and the fnDrawCallback is called as expected (buttons are binded for the new rows).
The only problem I have is that when the user changes the number of rows displayed per page, my buttons get unbinded and it's impossible to get details about any rows.
Best Regards,
Raphael

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    It should be! Can you link me to a test page showing the issue please.

    Allan
  • rbenedetrbenedet Posts: 2Questions: 0Answers: 0
    Hi,
    I found the issue. By changing the number of records displayed, the click event was rebinded a second time to the row "show details" button. Because of this, 2 click events were fired, the first one showing the row details and the second one hiding it, thus negating the effect.
    Sorry for my mistake,
    Raphael
This discussion has been closed.