I am confused about the difference between fnUpdate and fnDraw.
I am confused about the difference between fnUpdate and fnDraw.
I've written a dead simple example of a jQuery dataTable with buttons that update row values.
Here's the DataTables live link. I've never used it before, so please bear with me if there's a problem.
http://live.datatables.net/hogobena/1/edit
This example draws a grid with three rows, each containing a number and a button that can be clicked to update the number.
My understanding is that the fnDraw function is supposed to redraw the table. However, when I get the data from the table and update it and call fnDraw, nothing on the page changes, but if I call rows().data() to get the data again, I can clearly see that jQuery dataTables is returning the new data.
fnUpdate updates the row with no problems.
In this particular case, I would think that fnUpdate is the most appropriate function to use because I want to update just one row, but it still bothers me that fnDraw doesn't seem to be working. What am I doing wrong?