ajax row update with images in row

ajax row update with images in row

mbroadstmbroadst Posts: 14Questions: 0Answers: 0
edited May 2012 in DataTables 1.9
Hello,
We are currently using DataTables to display a relatively large list of data which may or may not have an image in the first column for any given row. The data is constantly changing in the background database so it's important to refresh the table at a regular interval in order to present the most current data. Currently, on each page we use setInterval to call .fnDraw(false), and that seems to work fine (maintains sort, search, etc.), however, if there happens to be an image displayed in that row it completely reloads the image and thus leads to a very frustrating user experience (imaging many images flickering in and out constantly..).

Is there any way around this? Is there a way to reload the data into the table and only update the fields of each row that are actually different? Is there a way to exempt a whole column from reloading, or a specific cell?

Thanks,
Matt

Replies

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    > Is there a way to reload the data into the table and only update the fields of each row that are actually different?

    Yes - you would need to use fnUpdate and fnGetData and check the current value, then update the data if needed.

    Other options include making sure that the browser is caching the images correctly and thus doesn't need to reload them form the server, or using sprites so its already in memory.

    Allan
This discussion has been closed.