Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checkbox input converting

Status
Not open for further replies.

NewbieScoobie

Technical User
Feb 8, 2009
8
NZ
Hi

I have some dynamically created checkboxes out of a database. However, the boolean values that are in the database are 0's and 1's (representing true and false) I'd like to use these directly to populate default values of the checkboxes. is there any way to do this conversion?

Thanks
 
When assigning these values to some variable(s) in flex why not put something in for the checkboxes like:

cbox.selected = variable;

cbox being the id of the checkbox. No need to convert if you are getting 0 & 1 or false & true.

But please do let me know how you are connecting to the database????
 
Hi

Thanks, but i actually got around it by adding selected{inputvariable==1} in the checkbox.

I'm actually using a perl script to access the database and populate xml. Not the most elegant, but work alright.
 
Hi,
well, I guess that is almost the same thing to fix the checkbox issue.

And thanks for your answer on the database thing. I am using vb.net to handle all database issues, but thought that I might have missed a way to directly connect to a database from within flex.

I hope they add that capability soon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top