views:

161

answers:

1

Gurus, I have a Adobe AIR application which has a datagrid. My requirement is to allow the user to make the column headers and the number of columns of that grid, customizable. 1. How can I get the column headerText values from DB? 2. If the user can enter the column names, it has to be saved to the DB and then loaded.

Pl suggest.

Regards ~Jad

A: 

You can set the header text programmatically as follows (where dg is your datagrid id):

(dg.columns[0] as DataGridColumn).headerText = "Something"

Reading from and storing to the database can be done many ways. To keep it simple, just create an httpservice in flex that invokes a php(or whatever your favorite scripting language) on the server side.

There is a simple example here on Adobe cookbooks