Guyver
Guyver

Reputation: 165

Flex 4 - pushing a text field's value into an array that populates a datagrid

Is this possible? I would like to be able to push a text field's value into an array on a button click, then have that array populate a data grid. I'm kind of new to flex and was wondering if someone could point me in a direction or show me how to do this.

Upvotes: 0

Views: 478

Answers (1)

Wade Mueller
Wade Mueller

Reputation: 6059

Yes, this is very possible. Create an array and assign it as the dataProvider for your DataGrid (Make sure your array is declared to as Bindable). Then append the value of the text field to your array whenever the user clicks the button. The DataGrid should update automatically whenever your bindable array changes. Hope that helps.

Upvotes: 1

Related Questions