What api calls should I be using?

What api calls should I be using?

chobo2chobo2 Posts: 23Questions: 2Answers: 0
edited May 2010 in General
Hi

I am kinda confused about these api calls and which one to actually use

fnAddData
fnDeleteRow
fnUpdate
fnClearTable


So this is what I want to do. I allow my users to create a new row and add it to the table. So the paging has to be updated, row count has to be updated in the paging area, sorting and filtering need to work on this table.

I am guessing I use "fnAddData' to achieve this with "redraw table" set to true. I am guessing redraw means like it recalculates and binds the stuff?

Also I am not sure how to add multiple rows? What I was currently doing was I just had a big html string with all the rows and added them to the table with jquery. Not sure if I can do this now or how I have to organize it.

I am also not sure how can I just add a html table row to it? Like in the example it looks like your doing it column by column. I am getting this row from the server already rendered. How can I just pass that in?

Now I am not sure when to use these ones

fnDeleteRow
fnClearTable

Like they seems to almost do the same thing. Like says for ClearTable

"Empty the entire table of current row information."

Is that not the same sort of thing like deleting a row( removing the row)? At first I though clearTable just removes all rows in the table.

Finally I don't know if I should be using fnUpdate.

Like I need to update a whole row and in the example it is like this

oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], 1, 0 ); /* Row */

but I return from a server a table row string. So can I just add that table row string. Or do I have to break it apart?

Thanks
This discussion has been closed.