fnAddData and HTML
fnAddData and HTML
anthony.tuininga
Posts: 1Questions: 0Answers: 0
All,
I have just started looking at using Data Tables for table sorting and pagination and really appreciate how well it works. Up to this point I was using the jQuery table sorter but it didn't have the abilities that this library does -- thus the switch. The reason I mention this is because before this I was using AJAX to update the table and the jQuery table sorter simply asks you to trigger the update which can be a considerable amount of overhead. So I was quite interested to see fnAddData and the ability to add rows one at a time without incurring that overhead. Unfortunately, that method only accepts an array of strings and I was passing back the HTML for the row from my AJAX call. Passing the array of strings would lose all of my formatting (and that has been confirmed) so I was wondering if there was any interest in adding a new method or enhancing the existing method to accept an HTML string for the row -- this would make use of the similar code for reading from the DOM and would be considerably faster. I am willing to write and test this and provide it back to this community if there is any interest; if not, I'll simply do it for myself, of course. Thoughts? Any reasons why I shouldn't do this???
Anthony
I have just started looking at using Data Tables for table sorting and pagination and really appreciate how well it works. Up to this point I was using the jQuery table sorter but it didn't have the abilities that this library does -- thus the switch. The reason I mention this is because before this I was using AJAX to update the table and the jQuery table sorter simply asks you to trigger the update which can be a considerable amount of overhead. So I was quite interested to see fnAddData and the ability to add rows one at a time without incurring that overhead. Unfortunately, that method only accepts an array of strings and I was passing back the HTML for the row from my AJAX call. Passing the array of strings would lose all of my formatting (and that has been confirmed) so I was wondering if there was any interest in adding a new method or enhancing the existing method to accept an HTML string for the row -- this would make use of the similar code for reading from the DOM and would be considerably faster. I am willing to write and test this and provide it back to this community if there is any interest; if not, I'll simply do it for myself, of course. Thoughts? Any reasons why I shouldn't do this???
Anthony
This discussion has been closed.