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

AllanCochraneAllanCochrane Posts: 41Questions: 1Answers: 2
edited December 2012 in DataTables 1.9
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?

Replies

  • allanallan Posts: 63,389Questions: 1Answers: 10,450 Site admin
    I've seen this done a few times, but I'm not aware of any open source code samples which are available to do this.

    Basically you need to use fnUpdate to add the additional data once the second Ajax call has completed.

    Allan
This discussion has been closed.