Take the 2-minute tour ×

I have a itemrenderer in datagrid and I am trying to get the instance of itemrender in datagrid keypressevent as follows

var col:DataGridColumn = _datagrid.columns[_datagrid.selectedCells[0].columnIndex]; var myItemrend:MyItemrender = col.itemRenderer as MyItemrender;

But the above myItemrend instance is null. How can I get the itemrenderer instance.

Please help.

Thanks, Rejeev.

share|improve this question
why do you need such hack? it looks few weird. Better to access current selected cell, and it will be also an instance of MyItemRenderer, but better explain why do you need it for. –  Eugene Sep 6 '10 at 20:40
add comment

1 Answer

I have an itemrenderer in Datagrid and it is used as itemeditor also by rendererIsEditor=true. My itemrenderer has a textinput and a list, where I open the list, for editing, when a focusin event is occurred in textinput, this happens while clicking the cell.

I need the same editing to happen while I enter using the keyboard(Enter), so I am trying to get the instance of the itemrender in Keyboard.ENTER and using this I can dispatch the textinput focusin event.

Thanks, Rejeev.

share|improve this answer
add comment

Your Answer


