DataGrid - Edit the selected row when a button is clicked.

Posted by Chepech on Stack Overflow See other posts from Stack Overflow or by Chepech
Published on 2010-01-13T19:29:37Z Indexed on 2010/03/27 2:03 UTC
Read the original article Hit count: 315

Hi all.

I have a very simple DataGrid with 2 columns, some thing like this:

<mx:DataGrid id="grid" >
    <mx:columns>
        <mx:DataGridColumn dataField="name" headerText="Name"/>
        <mx:DataGridColumn dataField="date" headerText="Date"/>
    </mx:columns>
</mx:DataGrid>

What Im trying to do is to activate the edition of the selected row when the user clicks a button. So far I've been unable to find any example of how to do this. I already tried 6 or 7 different approaches but non works. Does any one has a clue how to do this?

How do you get the selected row (NOT selectedItem) of a DataGrid and how can you:

  • Change the ItemRenderEditor or ItemRenderer on the fly of just that row.
  • Or enable the edition of that specific row without clicking it.

This are the questions that I've been unable to answer

Help will be greatly appreciated.

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript