fnDrawCallback not called on display length change
fnDrawCallback not called on display length change
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
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
This discussion has been closed.
Replies
Allan
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