Github like UI, one Ajax call to fetch some colums then second call to fill in other columns
Github like UI, one Ajax call to fetch some colums then second call to fill in other columns
AllanCochrane
Posts: 41Questions: 1Answers: 2
Hi,
a non-standard scenario, probably most easily explained by taking the Github.com UI as an example. When you visit a Github repository you get a list of files and then the UI is updated with the commit data (e.g. date and comment) for each file, asynchronously.
I'd like to do something similar with datatables, there are some columns that I can pull out from the database very quickly and I'd like them to be displayed in the table immediately (or as quickly as an AJAX call can be). Once these easily found columns are displayed then I'd like to get the more complex and calculation intensive columns from the database and display them in the table via a second AJAX call.
Has anyone done anything like this already?
a non-standard scenario, probably most easily explained by taking the Github.com UI as an example. When you visit a Github repository you get a list of files and then the UI is updated with the commit data (e.g. date and comment) for each file, asynchronously.
I'd like to do something similar with datatables, there are some columns that I can pull out from the database very quickly and I'd like them to be displayed in the table immediately (or as quickly as an AJAX call can be). Once these easily found columns are displayed then I'd like to get the more complex and calculation intensive columns from the database and display them in the table via a second AJAX call.
Has anyone done anything like this already?
This discussion has been closed.
Replies
Basically you need to use fnUpdate to add the additional data once the second Ajax call has completed.
Allan