Data table multi select problem
Data table multi select problem
lupacexi
Posts: 1Questions: 0Answers: 0
My requirement in the below code is when the page opens the table should be empty or with any default message.
After i select any value from the option box then the table data should appear.
But the problem here is, when the page opens the complete data is appeared but i dont want this.
Please help me with the code.
https://datatables.net/examples/api/multi_filter_select.html
This discussion has been closed.
Replies
DataTables operates on a filtering basis (i.e. start from the full data set and remove items that don't match), rather than on a search basis (i.e. start with an empty data set and query the data source).
What you would have to do to get what you are looking for is make use of the API. When your user selects an item in the list then it would query the data source and use
rows.add()
to add the returned rows to the table.Your issue there of course is that the
select
options are being built from the data in the table. So the data is needed in that example. You'd probably be better starting over rather than using that example to be honest.Allan