I have functions set up for when a row is clicked and double clicked. When a double click is done, it currently is treated as a single click then a double click. Single clicking selects a row, so I workaround that by deselecting the row again when the double click event runs. (If there is a better way, please share!)
My key problem is currently that when a click is done on any page other than the first, the current page changes back to the first page as soon as the single click is detected - I’m sure this worked a while ago, but doesn’t any more and I can’t figure out why! Help!
[code]function doOnRowDblClicked(rId,cInd) {
doOnRowSelect(rId); // Undo the checkbox toggle
var ne_id_cell=mygrid.cells(rId,1);
var myurl=‘dispatcher.php?pg=task.php&iit_ne_id=’+ne_id_cell.getValue()+’&filter=<?=urlencode($_GET['filter'])?>&orderby=<?=$_GET['orderby']?>&order_direction=<?=$_GET['order_direction']?>’;
window.open(myurl,‘EditTask’,‘width=1024,height=650,resizable=1’);
}
function doOnRowSelect(id) {
//Toggle the checkbox:
var cell=mygrid.cells(id,0);
if (cell.isCheckbox()) {
if (cell.getValue()==1) {
cell.setValue(0);
} else {
cell.setValue(1);
}
} else {
alert(“1st cell on row “+id+” was expected to be a checkbox!”);
}
}
[/code]
Added 11:42am - In fact, when I comment out the line:
mygrid.attachEvent(“onRowSelect”, doOnRowSelect);
Single clicking a row on page 2 still takes me back to page 1… so it’s not my function that’s doing it!