views:

549

answers:

2

Hi there,

I have a web page displaying data using dojo datagrid. Sometimes, users need to copy contents from certain cells for further analysis, but since browser's right click event is disabled in dataGrid, what's the best way to copy the contents to the clipboard? Thanks in advance!

David

+4  A: 

When you create your Grid, you can set selectable to true.

 <div dojotype="dojox.grid.DataGrid" selectable="true" ....>

Or programatically:

var grid = new dojox.grid.DataGrid( { selectable: true, ... });
seth
this is dojo 1.3 and up, I think, but with dojo 1.2.2
David Zhao
A: 

Great, thx. but, Hmm, I'm able to copy cell content, but only before I try to edit the cell - after it becomes unselectable ( Strange.

Ladislav