[flexcoders] Combobox to show table columns?

2008-08-26 Thread cox.blair
Just wonder if anyone has a trick to dynamically populate a combobox
with the column labels of a table or XML source. I seem to only manage
to retrieve the values of the rows, not the actual column name. I know
I manually list them, but this defeats the purpose if the table were
to change.

Ex. So instead of showing the value ALB_RLU, I want ALB_RLU to be a
selection in the combobox.

response
#8722;
data
#8722;
row
idATP_Calc82/idATP_Calc
UC1/
ALB_RLU33321./ALB_RLU
ALB_ATP213213./ALB_ATP
ALC_RLU213./ALC_RLU


Thanks,



RE: [flexcoders] Combobox to show table columns?

2008-08-26 Thread Alex Harui
Just walk the children() and pull the name() and add it to an array

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cox.blair
Sent: Tuesday, August 26, 2008 9:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Combobox to show table columns?

 

Just wonder if anyone has a trick to dynamically populate a combobox
with the column labels of a table or XML source. I seem to only manage
to retrieve the values of the rows, not the actual column name. I know
I manually list them, but this defeats the purpose if the table were
to change.

Ex. So instead of showing the value ALB_RLU, I want ALB_RLU to be a
selection in the combobox.

response
#8722;
data
#8722;
row
idATP_Calc82/idATP_Calc
UC1/
ALB_RLU33321./ALB_RLU
ALB_ATP213213./ALB_ATP
ALC_RLU213./ALC_RLU

Thanks,

 



Re: [flexcoders] Combobox to show table columns?

2008-08-26 Thread Blair Cox
Cheers Alex!

-- 
Blair 




From: Alex Harui [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Tue, 26 Aug 2008 12:40:18 -0700
To: flexcoders@yahoogroups.com
Conversation: [flexcoders] Combobox to show table columns?
Subject: RE: [flexcoders] Combobox to show table columns?

 
 

Just walk the children() and pull the name() and add it to an array
 



Re: [flexcoders] Combobox to show table columns?

2008-08-26 Thread Josh McDonald
mx:Combobox dataprovider={myGrid.columns} labelField=headerText/

Will probably do it. Depending on what's bindable you might have to simply
walk the datagrid.columns array.

But if you're dynamically creating the columns, why not simply include the
code to build your list of values for CB options at the same time?

-Josh

On Wed, Aug 27, 2008 at 5:40 AM, Alex Harui [EMAIL PROTECTED] wrote:

  Just walk the children() and pull the name() and add it to an array


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *cox.blair
 *Sent:* Tuesday, August 26, 2008 9:19 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Combobox to show table columns?



 Just wonder if anyone has a trick to dynamically populate a combobox
 with the column labels of a table or XML source. I seem to only manage
 to retrieve the values of the rows, not the actual column name. I know
 I manually list them, but this defeats the purpose if the table were
 to change.

 Ex. So instead of showing the value ALB_RLU, I want ALB_RLU to be a
 selection in the combobox.

 response
 #8722;
 data
 #8722;
 row
 idATP_Calc82/idATP_Calc
 UC1/
 ALB_RLU33321./ALB_RLU
 ALB_ATP213213./ALB_ATP
 ALC_RLU213./ALC_RLU

 Thanks,

 




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]