Is there a way to check if a row has been hidden by a filter?
var ind = mygrid.getRowIndex(id);
if (ind == -1) alert("hidden");
Doesn’t seem to work.
Always returns real index and not -1 if row is hidden (Return value is always 0 in my case).
alert(niceGrid[i].getRowIndex(“chartRow”));
if (niceGrid[i].getRowIndex(“chartRow”) == -1) {
niceGrid[i].setRowHidden(“chartRow”, false);
} else {
niceGrid[i].setRowHidden(“chartRow”, true);
}
setRowHidden doesn’t change indexed of the row. It just make row not visible. You will receive -1 index only if row is hidden by the filter
function isRowVisible(id) {
return (mygrid.getRowById(id)).style.display!='none';
}