Hi,
I have an advanceddatagrid with selectionMode="multipleCells". When i select few cells using ctrl key and then copy the content using Ctrl+c, the cells are getting deselected automatically and the content is not getting copied. Can someone help on this. Attaching part of my code.
private privatefunction myKeyDownHandler(event:KeyboardEvent):void { if (event.ctrlKey) { _ctrlHoldFlag = true; } }
privatefunction myKeyUpHandler(event:KeyboardEvent):void { var var keycode_v:uint = 86; var keycode_x:uint = 88; if { event.preventDefault(); if(event.keyCode == keycode_c) { copyData(event.currentTarget); } } if _ctrlHoldFlag = false; } } public var dataString="'; var n1:int = objCurrentTarget.selectedCells.length; (Note://The value of n1 is coming as zero and hence the content is not getting copied.) for (var iCount:int = 0; iCount < n1; iCount++) { var cell:Object = objCurrentTarget.selectedCells[iCount]; var data:Object = objCurrentTarget.dataProvider[cell.rowIndex]; var dataField:String = objCurrentTarget.columns[cell.columnIndex].dataField; if(dataString != "') { dataString = dataString + "|"+ data[dataField]; } } } Thanks in advance.