Categories | Question details Back To List | ||
how to add dblclick event to grid Hi, i have a grid with data whr user can double click on perticular row to get the the detail screen , now i need to attach dblclick event in the grid so tht on dblclick event i can call my function , i have tried with is sample code but i am not able to get the event mygrid.attachEvent("ondblclick",function(event_object){ alert("click"); alert(event_object); return true; }); i am able to get on selection of row using mygrid.setOnRowSelectHandler(doOnRowSelected); is the syntax correct , need ur advice thanks in advance. regards ravi. Answer posted by Support on Apr 02, 2008 03:55 >>mygrid.attachEvent("ondblclick",function(event_object){ The event name is case sensitive, so correct test is mygrid.attachEvent("onDblClick",function(event_object){ By the way, same as onRowSelect it has deprecated alias - setOnDblClickHandler Answer posted by ravi on Apr 02, 2008 08:11 Hi , i tried with your code , but still i am not able get the event .please find my sample code . in this only onKeyPress is being called rest other its not happening.
mygrid = new dhtmlXGridObject('gridbox'); mygrid.attachEvent("onDblClick",function(event_object){ mygrid.attachEvent("onClick",function(event_object){ mygrid.attachEvent("onKeyPress",function(keycode,ctrl,shift,event_object){ mygrid.init(); Answer posted by Support on Apr 02, 2008 08:56 Please refer to the http://dhtmlx.com/docs/products/dhtmlxGrid/doc/events.html#grid_api_ev it contains full list of supported events and their correct names ( the events marked with * available only in pro version ) |