display row count in html page
display row count in html page

I would like to count the number of rows and display the result in the html code
id="perftabs"> Performer Credits (row result)
This discussion has been closed.
I would like to count the number of rows and display the result in the html code
id="perftabs"> Performer Credits (row result)
Replies
You can use the
count()
API to get the number of rows. The examples should get you started.Kevin
I have to visualize the result of the record also in the web page, in a point I specified in the code
this
)
id="perftabs"> Performer Credits (row result)
)I now see below the table cells
the example I did not understand
You would use something like this:
Then you would use jQuery or your preferred method to place the value of
numRows
on the web page. Something like this example:https://datatables.net/extensions/select/examples/api/get.html
Now the question si when do you want to display that info? After a button click like the select example?
After the Datatable has initialized? You could use
initComplete
, something like this:Kevin
Hi kthorngren
the count must occur when I open the page
look this screen
https://yadi.sk/i/bLLNfDVU5X-ODw
Hi @Alex2019 ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin