Hi sande,
The cleanest production approach is to track row selection outside the jqxDataTable using a unique row identifier (such as id) instead of relying on the table’s internal selection state.
When the server returns refreshed data:
Save the IDs of the currently selected rows.
Update the table’s data source.
Wait for the table to finish rendering.
Reapply the selection by matching the saved IDs to the new rows.
This approach is resilient even if rows are reordered or updated, and it avoids losing the user’s selection after every refresh.
For larger datasets, avoid recreating the entire table instance every 30 seconds. Instead, update only the data source (or the changed rows if your implementation supports it), debounce unnecessary refreshes, and use stable row IDs so Vue and jqxDataTable can efficiently reconcile changes. This significantly improves performance compared to destroying and rebuilding the component on each polling cycle.
If anyone has implemented this at scale, I’d also be interested to hear whether you’ve found a better pattern than persisting selection by row IDs, especially for large datasets with frequent incremental updates.
Regards,
Peter