Column level (custom) filtering is Slower that that of the DataTable's default filter on IE8.0
Column level (custom) filtering is Slower that that of the DataTable's default filter on IE8.0
Hi Allan,
In our application we are using dataTable's global filter as well as we have added some column level filters which will filter the data from column index provided. We have around 20 columns.
In IE8 when I search using Global filter (dataTables's default filter) it filters records faster.
For column level filtering we have used one box and on keyup event of the input box we are calling function which will filter the data from particular column.
[code] [/code]
in filterData i have following code.
[code]
function filterData() {
var oTable=jQuery('#example').DataTable();
switch (type) {
case "106": //A Specific Patient
fnFilterColumn(0, '#input_filter');
break;
case "105": //A Specific Patient ID
fnFilterColumn(1, '#input_filter');
break;
default:
break;
}
}[/code]
switch ..case are nothing but to identify on which column i have to filter.
In fnFilterColumn I have
[code]function fnFilterColumn ( i, filterControlId )
{
var oTable=jQuery('#example').DataTable();
oTable.column(i).search(
jQuery(filterControlId).val(),
false,
true
).draw();
}[/code]
When I start typing on the input box in IE8.0 , there is some miliseconds gap while typing. I am not able to type continuously, so it takes some time lag to filter the data.
whereas in case of global filter, I am able to type fast and it returns data more quickly.
please have a look in this link http://live.datatables.net/OPUH/35 using IE8.0
I am using dataTable 1.10.0.beta 2
I am not sure why it takes that time lag while typing in text field ?
I have gone through datatable library file to see the code for global filter as well as column level filter, but still I am not able to get why filtering is faster in global filter and slow in the case of the column level filter?
Thanks in Advance !
In our application we are using dataTable's global filter as well as we have added some column level filters which will filter the data from column index provided. We have around 20 columns.
In IE8 when I search using Global filter (dataTables's default filter) it filters records faster.
For column level filtering we have used one box and on keyup event of the input box we are calling function which will filter the data from particular column.
[code] [/code]
in filterData i have following code.
[code]
function filterData() {
var oTable=jQuery('#example').DataTable();
switch (type) {
case "106": //A Specific Patient
fnFilterColumn(0, '#input_filter');
break;
case "105": //A Specific Patient ID
fnFilterColumn(1, '#input_filter');
break;
default:
break;
}
}[/code]
switch ..case are nothing but to identify on which column i have to filter.
In fnFilterColumn I have
[code]function fnFilterColumn ( i, filterControlId )
{
var oTable=jQuery('#example').DataTable();
oTable.column(i).search(
jQuery(filterControlId).val(),
false,
true
).draw();
}[/code]
When I start typing on the input box in IE8.0 , there is some miliseconds gap while typing. I am not able to type continuously, so it takes some time lag to filter the data.
whereas in case of global filter, I am able to type fast and it returns data more quickly.
please have a look in this link http://live.datatables.net/OPUH/35 using IE8.0
I am using dataTable 1.10.0.beta 2
I am not sure why it takes that time lag while typing in text field ?
I have gone through datatable library file to see the code for global filter as well as column level filter, but still I am not able to get why filtering is faster in global filter and slow in the case of the column level filter?
Thanks in Advance !
This discussion has been closed.