DataTable + DataFilter + DOM

DataTable + DataFilter + DOM

rodrigo2906rodrigo2906 Posts: 1Questions: 0Answers: 0
edited March 2012 in General
I'm trying to get the data from the datatable to persist on the db.

I'm populating the table using jquery template and it's working fine.

My table:
[code]



Modify
Currency
Rate
New Rate




[/code]

Template:
[code]
$('#_spotRatesTemplate').tmpl(_spotRates).appendTo("#tSpotRatesBody");
[/code]

My datatable:
[code]
spotRatesTable =
$('#tSpotRates').dataTable({ "bSort": false, "sPaginationType": "full_numbers","sDom":'<"top"p l>rt<"clear">'})
.columnFilter({sPlaceHolder: "head:before",aoColumns: [null, { type: "select" },null,null]});
[/code]

I also tried populating the datatable with a ajax call :
[code]
spotRatesTable = $('#tSpotRates').dataTable({
"bSort": false,
"sPaginationType": "full_numbers",
"sDom":'<"top"p l>rt<"clear">',
"aoColumns":[
{"mDataProp": null},
{"mDataProp": "currency"},
{"mDataProp": "spotRate"},
{"mDataProp": "newRate"},
],
"sAjaxSource":"/fxtrm/app/utilities/simulator/spotRates",
}).columnFilter({sPlaceHolder: "head:before",aoColumns: [null, { type: "select" },null,null]});
[/code]

I'm able to edit the table and update it's values using fnUpdate without any problem.

How can I POST the content of the datatable?
I tried to use $('#tSpotRates').serialize() but it returns nothing but the table length.

Please help
This discussion has been closed.