Is there a way to use "bServerSide": true along with fnAddData?
Is there a way to use "bServerSide": true along with fnAddData?
Hi Allan,
I really love the plugin and it's very useful.
I intend to use it as detail grid transactional module(purchase/sales).
When i'm editing a transaction at first i'll need bServerSide:true so i can load the data. But due to that, i can't use fnAddData as it keeps refreshing the datatables, even with fnAddData( data, false), the data still wont be added.
Is there a way to work around this? found similar thread to this but the i can't apply the solution as this is transactional with header-detail so need to be submitted together(all the details and header).
Thanks in advance!
I really love the plugin and it's very useful.
I intend to use it as detail grid transactional module(purchase/sales).
When i'm editing a transaction at first i'll need bServerSide:true so i can load the data. But due to that, i can't use fnAddData as it keeps refreshing the datatables, even with fnAddData( data, false), the data still wont be added.
Is there a way to work around this? found similar thread to this but the i can't apply the solution as this is transactional with header-detail so need to be submitted together(all the details and header).
Thanks in advance!
This discussion has been closed.
Replies
http://api.jquery.com/jQuery.ajax/
[code]
$.ajax({
url: "serverscript.php", // whatever the name/url of your script is
data: { "id": idvalue, "value": value}, // data to POST or add to querystring of your url.. for an entire row of data, add more parameters or make the value a string of items concatenated. however you want to handle
dataType: "json", // if you want the return data to be JSON, or xml, script, or html
//type: "POST", // commend this out to GET. or uncomment to POST the data
error: function(jqXHR, textStatus, errorThrown) { }, // error handler
success: function(data, textStatus, jqXHR) { } // success callback
});
[/code]
I'm looking to add data on client side using fnadddata but i dont want it to auto redraw the table until I need it to.
I try using fnAddData(data,false), when i check it using fnGetData, the data is added but it's not displayed on the datatables.
i set datatables().fnSettings().oFeatures.bServerSide to false prior to fnAddData
and return it to true after fnAddData.
thanks for the reply :D
With server-side processing DataTables is really no more than a display and event handler.
Allan
i'm just looking to use it as temporary table for displaying purchase detail which will be submitted to server all at once upon submit button trigger.