I have used one example from KB to open a sub row using event “rowOnSelect”.
But I cannot figure out how I can check that a row is already open so that I could close it.
Just like the plus/minus functionality. Right now i have:
mygrid.attachEvent(“onRowSelect”,function(id){
if (mygrid.cells(id,0).open) mygrid.cells(id,0).open();
return true;
});
Please help. Thank you.
—
Simon Siewior
You can try to use
mygrid.attachEvent(“onRowSelect”,function(id){
if (mygrid.cells(id,0).open){ //check that subrow exist
if (mygrid.getRowById(id)._expanded)
mygrid.cells(id,0).close()
else
mygrid.cells(id,0).open()
}
return true;
});
It worked like a charm,
Thank you for help!!!