:: Forum >> Version 2 >>

Right Click Functionality

Is there any option for adding right click functionality on activewidgets table or how I can add right click on a row of the table
Sandeep Saha
Tuesday, July 18, 2006
The following code will copy the contents of the current cell to your clipboard. You should be able to work from there.

// assign html event handler to row template
  
table.getCellTemplate().setEvent("oncontextmenu"raiseMenuEvent);

  
// assign grid event handler
  
table.onCellContextMenu = function(eventcolrow){
     
holdtext.innerText table.getCellValue(col,row);
     
Copied holdtext.createTextRange();
     
Copied.execCommand("Copy");
  } 
Mike
Tuesday, July 18, 2006
Well, that didn't answer the question.

how I can add right click on a row of the table?
Rob
Thursday, August 10, 2006
/javascript.forum.12947.7/how-to-properly-set-oncontextmenu.html

// html event handler translates to grid events
    
function raiseMenuEvent(event){
        
this.raiseEvent("onRowContextMenu"eventthis.$0);
    }

    
// assign html event handler to row template
    
obj.getRowTemplate().setEvent("oncontextmenu"raiseMenuEvent);


    
// assign grid event handler
    
obj.onRowContextMenu = function(eventrow){
        
alert("row=" row " x=" event.clientX " y=" event.clientY);
    } 
 
Alex (ActiveWidgets)
Friday, August 11, 2006



This topic is archived.

Back to support forum

Forum search