FLEX :  key board tab navigation in data grid control.

vmarada
vmarada used Ask the Experts™
on
can any  one tell me how to use key board tab navigation in data grid control.
 
This is my need:
 
I have a datagrid and i have a renderer for datagrid columns. in renderer i have text input. it means that in every datagrid column i have a text input control. whenever user enters some data and click on the tab(key board) then cursor should move to next text input(which is there in other column). please anyone tell me how to solve this
column.itemRenderer = new ClassFactory(TestCaseWithAddRenderer);
 
Here TestCaseWithAddRenderer is my renderer

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Can you post the code for TestCaseWithAddRenderer?

Really, you only want the text input control as the itemEDITOR, as it's pointless being able to enter text in the rendered content control - it's not as that point being treated as an editable cell. Hence when you tab, the item_edit_end event doesn't fire and the grid won't go looking for the next editable cell to set focus to etc.

Author

Commented:
code fof TestCaseWithAddRenderer : it contains only text input and some customized methods to display the text in text input


<mx:TextInput 
 
		id="textInput" 
		width="100%" tabEnabled="true"
		height="18" includeInLayout="false" visible="false" change="onTextFocusOut()"
		focusOut="onTextFocusOut();"/>

Open in new window

Commented:
As you're trying to use a TextInput control for editing cell contents, what's wrong with the default cell editor when you make the column editable?
Making the column editable is much a easier solution. DataGrid takes care of navigating the next editable cell automatically.
Commented:
Provide tab index based on column and row index in the renderer.

For example 3 row 4 th colunn , tabindex would be 34 and calculation is done in the renderer and hence problem is addressed.

Thank You,
-Visweswar

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial