DataTable Filtering Menu
DataTable Filtering Menu
I want to create a Filtering Menu to allow the data being shown to be narrowed down. I have created sevreal Dropdown boxes which users can select from. I know how to get the data when a button has been pressed, but how do I update the datatable and pass the values in once the button has been pressed? I am trying to use fnServerData but with no avail.
Thanks
Thanks
This discussion has been closed.
Replies
Please link to your page in future please, as required in the forum rules, so we can look at your code and understand the problem.
Allan
var oTable = $('#Table').dataTable({
"bServerSide": true,
"sAjaxSource": "GetDaata",
"bProcessing": true,
"fnServerData": function (sSource, aoData, fnCallback) {
aoData.push({ "name": "item", "value": $('#query').val() });
$.getJSON(sSource, aoData, function (json) {
fnCallback(json)
});
}
});
Here you can see the code for my datatable. I want to pass selected values to my controller and return a new JSON Query with filtered results. I am having trouble trying to implment the passing bit, where it can get the values at anytime and pass this back.
Can you explain why or If its wrong? Also is fnFilter Server or client Side?
Also in the Table Footer, do I add those textboxes mnaually or is there code that created this for me?
Allan
Allan