0
votes

I have one flex datagrid which contains number of rows and column. I want to make selected row editable by clicking on edit button. Is it possible? I have try many samples but on that either entire datagrid is editable or particular row's single column is editable. Is there any way to make selected row editable by clicking on edit button?

1
can you please provide the users with your work or code. So that they can help you.Prahalad Gaggar

1 Answers

0
votes

You can get the selected row with the grid.selectedIndex property. One thought to you problem:

Add an "editable" property to you items in the datagrid which is false by default
When clicking on the button, set grid.selectedItem.editable = true;
Change the grid's item renderer to a new one, which displays TextInput fields if an item is editable or just plain Label if it's not

You can change the item renderer at runtime like this:

grid.itemRenderer = new ClassFactory(com.myapp.renderers.MyGridItemRenderer);