0
votes

I am working with a flex application. I want to enable my Flex DataGrid cell editable when i press ENTER key on a selected cell. The particular cell contains an itemRender. I know F2 key will do the thing. But i want to override that function.

Could any body help me to get this working...

Thanks in advance...

1

1 Answers

1
votes

You could create a class that extends spark data grid and override the editKey like this :

package mypackage
{
    import flash.ui.Keyboard;

    import mx.core.mx_internal;

    import spark.components.DataGrid;

    use namespace mx_internal;

    public class CustomDataGrid extends DataGrid
    {
        public function CustomDataGrid()
        {
            super();
            super.mx_internal::editKey = Keyboard.ENTER;
        }
    }
}