H4wak
H4wak

Reputation: 3

Create a button in a Datagrid with Action Script 3 and Flex 4.6

I have an application working with AS3 and FLex 4.6. I have a Datagrid automatically generated with some data, using :

var colonne:GridColumn = new GridColumn(DATAFIELD_NAME_LIBELLE);
colonne.headerText = "GPT";
datagrid.columns.addItem(colonne)
/*Building some others columns automatically*/
...
ligne = new Object();           
ligne[DATAFIELD_NAME_LIBELLE] = "Standard";
/*building some other rows and adding them to the right columns automatically*/
...

But i don't know how to add a button in a specific cell. I linked the grid i have in this image : The grid i have, the "GridItem10662" is where i want to put my button. I tried with a button inside a GridItem but it's not working. Another problem is that i want in the first column, text for 1st and 2nd rows and a button for the 3rd row.

Maybe it can work with GridItemRenderer but i don't know how to work on separated rows in a same column.

Thanks for your help!

Upvotes: 0

Views: 133

Answers (0)

Related Questions