Is it possible to hide rows when creating table from CSV file?
Is it possible to hide rows when creating table from CSV file?
MJ79
Posts: 5Questions: 3Answers: 0
In the same way that columnDefs can make some columns visible TRUE or FALSE, can the same be done for rows? For example, if I have a CSV file with 50 rows of data, can I just show rows 10 to 30?
This discussion has been closed.
Answers
take a look at this; https://datatables.net/examples/plug-ins/range_filtering
$.fn.dataTable.ext.search.push allows you to filter rows.
our use rowCallback
https://datatables.net/reference/option/rowCallback
I don't think any of the two examples offer a solution? I need the rows to be hidden when the table initially loads, similar to the way columns can be?
You can use the
search
option to set the initial search.Kevin
they both do, I can reassure you ...
Here is an example for the callback
CSS:
Using bootstrap it should even be easier because you don't need any CSS
e.g.