autofill rows
autofill rows
chester_cheetos
Posts: 1Questions: 0Answers: 0
Hello,
I have a result with 23 rows and my iDisplayLength = 10;
Now I want to show always 10 rows. So when the last page returns 3 rows
i want to add 7 empty rows.
Is this possible?
I have a result with 23 rows and my iDisplayLength = 10;
Now I want to show always 10 rows. So when the last page returns 3 rows
i want to add 7 empty rows.
Is this possible?
This discussion has been closed.
Replies
There isn't actually a method implemented in DataTables which does this automatically for you, but it certainly is possible to quickly add it in. What to do is make use of fnDrawCallback(), and check to see if your table has the required number of TR elements in it ( nTable.getElementsByTagName("tr") == 10, etc ) and if not, simply create and append the nodes required. This way they are temporary nodes which DataTables knows nothing about but will achieve exactly what you are looking for.
Regards,
Allan