Synching two related datatables with one ajax source

Synching two related datatables with one ajax source

bdk0172bdk0172 Posts: 6Questions: 3Answers: 0

We have a page that has the ability to flip-flop between two different, but related, datatables. The first datatable will eventually have the ability to let the user choose what columns they want to see based on a predefined list. The second datatable has two columns, id and address, and we also display a Mapbox element along with it that displays markers related to the addresses. We are using a button to retrieve the data for the tables through ajax source and server params. If we have already retrieved the data and the user switches from one datatable to the other, instead of doing another retrieve we are using the cached data. Both of the datatables take advantage of the built-in filter. I have figured out how to retrieve the value from the filter on one datatable and populate the value of the other and do a search() on it when moving between the two. A problem arises though when the value typed into the filter matches data from a column in one datatable that is not contained within the other. One datatable will show the filtered data and the other will not show any data at all. Is it possible to synch the data between the two while still having the ability to use the built-in filter.

This discussion has been closed.