Featured post
jquery - DataTables Server Side Individual Column Filtering -
i hoping can me this. have been running myself crazy this.
i have situation load datatables grid (awesome piece way!) , great. go search , run problems. data being populated in grid coming 2 different database tables (which fine) when executes search have no way of knowing go , data. need know criteria search (i.e. title or contact). see when search called server via default search box there variables "ssearch_0" unset, how set?
here initialization code table:
otable = $('#example').datatable({ "bjqueryui": true, "bfilter": true, "spaginationtype": "full_numbers", "bpaginate " : true, "bserverside" : true, "sajaxsource" : "php/tabledata.php", "aocolumndefs": [ { "bsortable": false, "atargets": [ 0,6,8 ] }, { "sclass": "tdcenter", "atargets": [ 0,1,2,3,4,5,6,7,8 ] } ], "fnserverdata": function ( ssource, aodata, fncallback ) { aodata.push( { "name": "userid", "value": userid } ); $.getjson( ssource, aodata, function (json) { fncallback(json) }); }
});
i have looked options adding data "fnserverdata " , use first initialization server call unsure how use subsequent server call. have tried use "fnfilter" not see executing server call more data. @ point not see other way execute server call besides default search box , see way of knowing column search for.
can me here , point me in right direction?
if getting data server datatables plugin, have set bserverside true, set sajaxsource appropriate url, , ideally configure fnserverdata if need callbacks.
if use server-side processing, sorting, filtering, , paging needs handled on server. if configure datatables correctly, request data server time there paging, filtering, or sorting event.
- Get link
- X
- Other Apps
Comments
Post a Comment