Horizontal scrolling plus individual column filtering problem

Horizontal scrolling plus individual column filtering problem

hiralhiral Posts: 9Questions: 0Answers: 0
edited December 2011 in General
I have used horizontal scrolling plus individual column filtering (mix text box and select box).
Page format looks nice initially, but when I do sorting or filtering, my filter boxes or I can say footer whole row gets disappear.
Somebody please help me. Below is my code.

[code]
In javascript-

(function($) {
$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) {
// check that we have a column id
if ( typeof iColumn == "undefined" ) return new Array();

// by default we only wany unique data
if ( typeof bUnique == "undefined" ) bUnique = true;

// by default we do want to only look at filtered data
if ( typeof bFiltered == "undefined" ) bFiltered = true;

// by default we do not wany to include empty values
if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true;

// list of rows which we're going to loop through
var aiRows;

// use only filtered rows
if (bFiltered == true) aiRows = oSettings.aiDisplay;
// use all rows
else aiRows = oSettings.aiDisplayMaster; // all row numbers

// set up data array
var asResultData = new Array();

for (var i=0,c=aiRows.length; i -1) continue;

// else push the value onto the result data array
else asResultData.push(sValue);
}

return asResultData;
}}(jQuery));
/* range filter { */
function createRange(iCol){
var maxid = 'col' + iCol + 'max';
var minid = 'col' + iCol + 'min';
$.fn.dataTableExt.afnFiltering.push(
function ( oSettings, aData, iDataIndex ) {
var iMin = document.getElementById(minid).value * 1;
var iMax = document.getElementById(maxid).value * 1;
var iColumn = aData[iCol] == "-" ? 0 : aData[iCol]*1;
if ( iMin == "" && iMax == "")
return true;
else if ( iMin == "" && iColumn <= iMax)
return true;
else if ( iMin <= iColumn && iMax == "")
return true;
else if ( iMin <= iColumn && iColumn <= iMax)
return true;
return false;
}
);
return '
';
} /* range filter } */
function fnCreateSelect( aData )
{
var r='', i, iLen=aData.length;
for ( i=0 ; i

Replies

  • dbludblu Posts: 11Questions: 0Answers: 0
    I have the same problem. No solutions. the input boxes for filtering.. POOF gone! Allan, any thoughts?
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Could you post a link to a demo page showing the problem so I can see it in action and debug it?

    Thanks,
    Allan
  • codereavercodereaver Posts: 1Questions: 0Answers: 0
    Allan,

    I am having this issue as well and do duplicate it just add the basic table structure and then add the reference to datatables and columnFilter and then on the datatable def add either of the sScroll's and when you type in the filter text box it will filter and then the input box disappears
  • KA2012KA2012 Posts: 16Questions: 0Answers: 0
    Did you solve this? I'm having a similar problem when I have any "sScrollX or sScrollY or other scroll" related attributes. My filter fields show up correctly, but when I enter input, it always shows "no records" instead of filtering properly. But the filtering works fine when I remove all "scroll" attributes. I've tried both the ColumnFilters add-on, and doing it manually with the fnFilter examples. Please help.
  • KA2012KA2012 Posts: 16Questions: 0Answers: 0
    Anybody?
This discussion has been closed.