How do you use mRender to keep a row visible

How do you use mRender to keep a row visible

AkhorAkhor Posts: 6Questions: 0Answers: 0
edited April 2013 in General
Hi,

Depending on the content of my column (isNaN) I would like to keep the row visible on the screen no matter what the filter criteria. The only way I could think to do this was to return the value of the filter criteria when filtering.

However, it seems as though this "filter" is not always called as the results get smaller.


mRender: function(data,type,val){
//data is not always a interger
var sData = parseFloat(data);

if (type === 'filter'){
console.log("filtering: " + data);
if ( isNaN(data) ){
//return the value of the filter we are using so the row stays on the screen
console.log( "Filter Val:" + $("#dataTable_filter input").val() );
return $("#dataTable_filter input").val();
}
}
console.log(type);
return sData;
}

Replies

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    > How do you use mRender to keep a row visible

    You don't - that isn't possible. If you want a row to not be filtered out you need to modify the filtering or use a plug-in.

    Allan
This discussion has been closed.