count number of rows that contain a specific string in a certain column
count number of rows that contain a specific string in a certain column

Hi
Is it possible to count all rows in a datatable that contains a specific string in a certain column? I guess this has to be done in table.on( 'draw' since I want it to work when using filtering also. Hope someone can help me out here.
This discussion has been closed.
Answers
Yep,
draw
is one way to go. Possibly better to do it insearch
, asdraw
would also be called when ordering and paging, which wouldn't affect the count, but that would only really matter if you're expecting a large number of records,Colin
Use table.rows().count() with search: “applied“ like table.rows( {search: “applied“}).count()