Liran Friedman
Liran Friedman

Reputation: 4287

How to set the default amount of rows in datatables plugin?

Does anyone know the Yet Another DataTables Column Filter (yadcf) js plugin ? It doesn't have much documentation and I can't figure out how to set the default number of rows to display (it shows 10 rows as default and I want at least 50).

Upvotes: 0

Views: 357

Answers (1)

Daniel
Daniel

Reputation: 37061

Quick answer: "pageLength": 50 (for 1.10+) or "iDisplayLength": 50 (for 1.9-)

Long one:

You need to distinguish between the datatables plugin and yadcf plugin

The sole purpose of yadcf it to allow the user the ability to easily add various types of filters to the datatables table

This jQuery plug-in allows the user to easily add filter components to table columns, the plug-in works on top of the DataTables jQuery plug-in.

So your current question is not related to the yadcf plugin,

But if you look at the yadcf showcase you can spot that in on of its pages it demonstrate the use of the iDisplayLength attribute (which is the one you need your case)

Look at the page Yet Another DataTables Column Filter - DOM source example, scroll till you see the code snippet used on that page , notice the: "iDisplayLength": 25


p.s I'm the author of yadcf

Upvotes: 1

Related Questions