header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
krishna
Points:260
Posts:0

5/29/2010 12:46:04 AM

Title: radio button


Hi,

I have a datagrid, in datagrid inside radio button itemrender.
My Datagrid Column name like select(Radio Button) , Id, Name.

By getting the result from the database . The Select filed getting the data from the database like 0's and 1's . But 1 means its Radio Button selected true. How to show it?

my Code is

if(NpiArr != null)
{
for(var i:int=0; i<NpiArr.length; i++)
if(NpiArr.getItemAt(i).GetSetDriving == 1)
{
NpiArr.getItemAt(i,0).GetSetDriving = true;
}
}


GetSetDriving is DatagridColumnName, inside Radio Button Item Render.

Thanks.



1
Marx
Points: 0
Posts:0
5/29/2010 12:53:26 AM



you can cast the value of 1 and 0 to boolean while setting the property in checkbox item renderer


selected=Boolean(yourValue)

in your case the yourValue is coming from database as 1 and 0 by using bo0lean() it will be converted to false or true

2
HuHa
Points: 0
Posts:0
5/29/2010 4:50:49 AM



you can simply set the checked property value inside the renderer

checked= data.checkedValue;


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 4+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions