After add, update table rows, column filter select option drop down values not updating.
After add, update table rows, column filter select option drop down values not updating.

I have a table with column header drop down values to be filtered. When I add a row or change the row value, I do not see the drop down values getting updated. I triggered the table.draw() event after the CRUD operation but it didn't help either. What am I doing wrong ?
This discussion has been closed.
Answers
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
A possible thing to try is
rows().invalidate().draw()
, if that doesn't work, we'll need that test case.Colin
Hi Colin, I tried invalidate method and it didn't help. This is the linked page. If I add the event name say "zzz", it is not showing the item under Event Name dropdown filter. I have attached the table definition below. Looking forward to the solution. Thanks
See if this thread helps.
Kevin
Thank you kthorngren for the right pointer. The example code put by Allan in Jsfiddle (BuildSelect) resolved this issue. For understanding, why do we need to explicitly build the select values,for each draw? as part of the table reload after crud completion, should this not be automatically taken care by the datatable reload mechanism?
The search inputs you create are not part of the Datatables API. It has no knowledge of them so won't perform any actions on them. It is your responsibility to keep up with the select options
Kevin