How do you use mRender to keep a row visible
How do you use mRender to keep a row visible
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;
}
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;
}
This discussion has been closed.
Replies
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