actionscript 3 - AS3 Flash checkbox in datagrid -
actionscript 3 - AS3 Flash checkbox in datagrid -
i have fill grid mysql database using service. have datagrid this
col_1 col_2 col_3 col_4 [chekbox] value value value [chekbox] value value value [chekbox] value value value [chekbox] value value value
note : plid value checkboxes
for (varname in returnobj) { var plid = int (returnobj[varname]["plid"]); var varstate = string(returnobj[varname]["state"]); var varcity = string(returnobj[varname]["city"]); arrdp.push({ //arrdp array defined //column value select : plid, state : varstate, city : varcity }); var dp:dataprovider = new dataprovider(arrdp); var select:datagridcolumn = dg.addcolumn("select"); var state :datagridcolumn = dg.addcolumn("state"); var city :datagridcolumn = dg.addcolumn("city"); dg.dataprovider = dp; //dg datagrid name , dp dataprovider }
value chekboxes : 1 & 0. 1 mean true(selected) , 0 mean false(not selected). question how show checkboxes selected value 1?? checkbox need event occur state change. using next cellrender class.
http://www.actionscript.org/forums/showthread.php3?t=234416
thanks in advance.
create checkbox
instance. check if plid
1 or 0 , toggle checkbox accordingly.
like so:
//the checkbox instance variable name in illustration cb cb.selected = plid == 1 ? true : false;
the selected
getter/setter indicates if checkbox
displayed checked or not.
read more here: http://livedocs.adobe.com/flash/9.0/actionscriptlangrefv3/fl/controls/labelbutton.html#selected
flash actionscript-3
Comments
Post a Comment