Skip navigation
hhhjhjhjhjh
Currently Being Moderated

Move focus from one to another itemRenderer inside DataGrid itemRenderer

Aug 17, 2012 7:31 AM

I have a mx: DataGrid with 4 columns that have a itemRenderer with the following settings:

 

 

- Mx:DataGrid:

 

<code>

<mx:DataGrid id="itensPedidoCompraList"

      width="100%"

height="120"   

dataProvider="{ model.pedidoCompra.itens }"

editable="true"

itemEditEnd="itensPedidoCompraList_itemEditEndHandler(event)">

</code>

 

- Mx:DataGridColumn:

 

<code>

<mx:DataGridColumn headerText="{resourceManager.getString('cadastroPedidoCompra', 'ident.PercentualDesconto') }"

                   width="60"

                   textAlign="right"

                   rendererIsEditor="true"

                                      editorDataField="data">

      <mx:itemRenderer>

                 <fx:Component>

                       <mx:Canvas>

                                 <input:NumberInput width="55"                                                                 number="@{ data.percentualDesconto }"/>

                       </mx:Canvas>

            </fx:Component>

      </mx:itemRenderer>

  </mx:DataGridColumn>

</code>

 

The user clicks on the line of the grid and click on the column to edit.

After him change or add value, ENTER key and have to move the focus to another column in the same line.

The way I'm doing, is moving to the column below.

 

What is the best way to do to move to the right column?

 

 

thank you

 
Replies
  • Currently Being Moderated
    Aug 17, 2012 10:01 AM   in reply to hhhjhjhjhjh

    Try adding a capture phase event listener to DataGrid for keyDown and changing the key from ENTER to TAB

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points