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.

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


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.setImagePath("…/…/codebase/imgs/");
 mygrid.setHeader(“Column A, Column B, Column C, Column D”);
 mygrid.setInitWidths(“100,250,80,*”)
 mygrid.setColAlign(“right,left,center,center”)
 mygrid.setColTypes(“ro,ro,ch,price”);
 mygrid.setColSorting(“int,str,str,str”)
 



 mygrid.attachEvent(“onDblClick”,function(event_object){
      alert(“click”);
      alert(event_object);
      return true;
  });




  mygrid.attachEvent(“onClick”,function(event_object){
      alert(“click”);
      alert(event_object);
      return true;
  });




  mygrid.attachEvent(“onKeyPress”,function(keycode,ctrl,shift,event_object){
     if(event.keyCode == 10 ||event.keyCode == 13){
       event.keyCode=9;
   alert(event_object);
   }
  }) 




 mygrid.init();
 mygrid.loadXML(“grid.xml”);

Please refer to the
    dhtmlx.com/docs/products/dhtmlxG … rid_api_ev
it contains full list of supported events and their correct names ( the events marked with * available only in pro version )