I have a grid with a context menu. When I click on the menu the page scrolls to the top. A search on the internet showed that event handlers must return false to stop that problem. I added a return false to my event handler and that did not fix the problem. Does the dhtmlxgrid attach event api function ignore that return false?
// Links grid context menu onShowMenu function
function onShowMenu(rowId, celInd, grid) {
var arr = ["add","delete","inc", "dec", "link", "edit", "set_avail", "set_unavail", "del_best", "add_best"];
for (var i = 0; i < arr.length; i++) {
/* links_grid_menu.hideItem(arr[i]); */
}
menu_active_grid = this;
switch (celInd) {
case 0:
links_grid_menu.showItem("add");
links_grid_menu.showItem("delete");
break;
case 1:
links_grid_menu.showItem("link");
break;
case 2:
links_grid_menu.showItem("link");
break;
}
return true;
}
What does the grid function return for the onclick event: true? false?