Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by TF_Justin on Jul 09, 2008 16:05
open dhtmlx forum
Possible to disable click events for cells in Grid?

Given a dhtmlx Grid, is it possible to disable all cell click events? I ask because the internal click events (Grid's onclick and _onClick) are being fired when the Grid has already closed. The Grid is being closed because I have a button in a cell that when clicked, removes the Grid (and does some app-specific stuff). But when my button is being clicked, the event still bubbles up then I get a "this._fake.eventCall is null" javascript error on dhtmlxGrid_split.js, which by then, the Grid is gone. Any ideas?

Answer posted by Support on Jul 10, 2008 01:50
If you are using custom HTML to create button, you can block the event bubbling as
    <input type="button" onclick="(arguments[0]|event).cancelBubble=true; custom_code(); " />

There is no any legal way to stop event distribution on grid's level, but you can fully block inner reaction by   
    grid._doClick=function(){};