dataTables: Master-Detail search problem
dataTables: Master-Detail search problem
I have an ID field in master table (not a dataTable).
Based on that ID the Detail table (Its a dataTable) has to be populated.
On button click, I called .empty(); then fnDestroy(); then $("#companies").dataTable({//all the required parameters and appending the ID in "sAjaxSource" for search)}.make editable ({.....});
It works fine but results in a strange situation. If I search the value it brings in accurately. However, after searching if I add a row it results in adding 2 rows against one call. If a add a new row without initiating search functionality it adds only one row which is fine.
By debugging I came to know that the fnDestroy(); is the culprit. If I don't use this method I am not ale to get the required search functionality. Hope to see some solution from you people.
P.S. I tried few other methods like .fnClearTable, clear(), destroy() but none of them are working resulting into "object doesn't support this property or method". I tried them with both $("#companies").dataTable().clear() and $("#companies").DataTable().clear(). None of them worked.
Regards,
Misbah.