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.
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
5/29/2010 4:50:49 AM
you can simply set the checked property value inside the renderer
checked= data.checkedValue;