Number of rows in datatable page

UI Components for JSF
Post Reply
JuanRonline
Posts: 17
Joined: 16 Jul 2014, 17:41

26 Aug 2014, 16:46

Hi, I need to show the number of rows wich is shown in the datatable page.

For example, if in the last page, datatable shows 25 rows max, and there are only 18 rows, I want to show "18 rows"

Is it possible?

Thanks.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

26 Aug 2014, 17:16

Not that I know of without a hack... What I use is the rowIndexVar and display it in the first column.

JuanRonline
Posts: 17
Joined: 16 Jul 2014, 17:41

26 Aug 2014, 17:25

Aham, I knew that, thanks, but it's not exactly what i need.

If is not possible, maybe i'll try to show the shown rows number with javascript :(

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

26 Aug 2014, 17:42

Yep... e.g. hide the column with the rowIndexVar and get the value with javascript, or count the number of rows with javascript and show put that in paginator somewhere with jquery dom manipulation. That is what I call a hack, but it should work

JuanRonline
Posts: 17
Joined: 16 Jul 2014, 17:41

27 Aug 2014, 09:36

Ok, thanks!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests