PDA

View Full Version : binding data to DataGrid Flash MX


heyder
12-16-2003, 02:23 PM
can someone give me an example of how I would bind data to a DataGrid using different column names than what is returned from the database.


ie...

query database for contactname, email...

column names show as Contact Name, E-Mail


can I do this using DataGlue somehow?

heyder
12-16-2003, 03:43 PM
I got this to work using the following

DataGlue.bindFormatFunction(staff,result,bindGrid) ;


function bindGrid(result){
return {contact:[result.contactname], email:result.email};
}


so that's fine but... I wanted to label the column contact name(two words and a space).

Does the DataGrid not allow this or is it something else?

Eric Echols
12-23-2003, 05:44 AM
An alternate method would be to Select mycolumn as ColumnNew from mytable