Open GoogleCodeExporter opened 9 years ago
Many thanks for this. This got my server-side filtering working, but for ranges
no search values are being sent in the request. Since I am new to this software
I don't know where this issue was introduced (original code or this patch). I
am just not getting any parameter values through for range search values so I
can't do the filtering on the server side for those fields.
Original comment by pmozi...@metamedia.us
on 9 May 2014 at 9:28
Range filtering didn't work for me either, with this solution -- I THINK it's
because I'm using an object for the value of my "ajax" datatable setting,
instead of a function. Eventually I replaced all the code above with:
if (oTable.api().settings().context[0].bAjaxDataGet) {
$(oTable[0]).on('preXhr.dt', function ( e, settings, data ) {
for (j = 0; j < aiCustomSearch_Indexes.length; j++) {
var index = aiCustomSearch_Indexes[j];
if ($.fn.dataTable.ext.legacy.ajax) {
for (var key in data) {
if (key == "sSearch_" + index)
data[key] = afnSearch_[j]();
}
} else {
for (k = 0; k < data.length; k++) {
if (data[k][searchable] === true)
data[k][search][value] = afnSearch_[j]();
}
}
}
console.log(data);
} );
}
which seemed to work.
Original comment by p...@silvertree-capital.com
on 20 May 2014 at 11:25
Oops, I left a trailing console.log line that can be removed.
Original comment by p...@silvertree-capital.com
on 20 May 2014 at 11:25
Silvertree-
Thank you very much for your patch. I was tearing my hair out over this one. Do
you (or anyone else) know when this might be integrated into the release
version?
-Josh
Original comment by j...@wiz4.us
on 20 Aug 2014 at 1:48
Hi,
in your experience, this the only change to do to use
jquery-datatables-column-filter
with DataTables 1.10 ?
As I see the official trunk is stopped at March so the last version doesn't
work with DataTables 1.0
Original comment by ztaj...@gmail.com
on 2 Oct 2014 at 2:29
Yes.
But now, I andonned this jQuery plugin to be fully compatible with the last
version. I fully generate individual column filters with my server language
(PHP). I write a librairie available.
DOc : http://www.robin-d.fr/DataTablesPHP/
Source : https://github.com/RobinDev/DataTablesPHP
I kept the same logic except I don't yet add the capability to generate select
option from the data. It will come soon.
Original comment by onrobin...@gmail.com
on 16 Nov 2014 at 10:53
Original issue reported on code.google.com by
onrobin...@gmail.com
on 2 May 2014 at 2:50Attachments: