fnUpdate 3rd param -- Column Index Not Ignored as supposed
fnUpdate 3rd param -- Column Index Not Ignored as supposed
First, thank you so much for creating such an awesome data table framework that I can't image life without it before.
According to the documentation of fnUpdate, the 3rd input param: {int}: The column to update (not used of mData is an array or object).
When I try to pass fnUpdate([1,1,1,1], 0, 0, false, false), this param is not ignored and rendered right into the first cell in the first row as a string of 1,1,1,1. Since I need to use the 4th and 5th params and I need to pass a value for the column index.
Is that a bug in the new version? I'm using 1.9.3
Thank you!
According to the documentation of fnUpdate, the 3rd input param: {int}: The column to update (not used of mData is an array or object).
When I try to pass fnUpdate([1,1,1,1], 0, 0, false, false), this param is not ignored and rendered right into the first cell in the first row as a string of 1,1,1,1. Since I need to use the 4th and 5th params and I need to pass a value for the column index.
Is that a bug in the new version? I'm using 1.9.3
Thank you!
This discussion has been closed.
Replies
Draw the table after all the columns and rows gets updated, so that fnDraw won't be unnecessarily called so many times on each fnUpdate.
I have a work around on the above question by making the update per cell instead per row, so that the column index param of fnUpdate is actually used. In my application I need to flash the cells that gets updated, by adding a highlight css class to the span of the cell using fnRender.
But I still want to make sure if fnUpdate's 3rd param is supposed to be ignored if the data passed in is an object or an array.
No it shouldn't be :-(. Could you link me to an example of this not working please? There are unit tests that should catch this kind of thing, but it is possible the coverage isn't complete!
Allan