Data source from server, DataTables with form elements

Data source from server, DataTables with form elements

growingcockgrowingcock Posts: 2Questions: 0Answers: 0
edited January 2010 in General
I want to create a table from DataTable similar this situation http://datatables.net/examples/api/form.html
but I want that my table will get data from server. Is there any way to do that?

For example my table have 3 column A, B,C and an CheckBox (CB) column.
A, B, C will get data from web server. And the server only return data of A,B,C not CB

I wrote this
[code]Loading data from server
[/code]
If the header have 3 column It doesn't work.
If I add more column to the header, it will raise an error "added data does not match the number of row column"
Please help me with this

Replies

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    You need to have the server return the same number of columns as the table knows about - just as the warning tells you. If this means you need to return a blank string for the checkbox - so be it :-). If the server were to miss out a column, then it would be ambiguous which column is being left out (the last one is the obvious case, but not always true). So just add an empty string to your return.

    Regards,
    Allan
  • growingcockgrowingcock Posts: 2Questions: 0Answers: 0
    :( not a perfect method but thank you very much for supporting :-X
This discussion has been closed.