Search Flex Samples

Datagrid Component

The default behavior of editing a cell in a Flex DataGrid is such that if you hit the enter key its moves to the next cell down, and tab moves to the next cell to the right.If you want it so that when you hit tab or enter, that it just commits that current cell and stays on that row in uneditted mode you’ll want to combine callLater() and the itemEditEnd event.





<mx:Script>

private function maintainFocus():void

{

dg.editedItemPosition = null;

}

</mx:Script>


<mx:DataGrid editable=”true” sortableColumns=”false” id=”dg” itemEditEnd=”callLater(maintainFocus)” id=”dg”>





</mx:DatgaGrid>


0 comments:

Related Flex Samples

Learn Flex: Flex Samples | Flex Video Tutorials Flex Examples