Tag Archives: check box

Check Box as item Renderer in a DataGrid

<?xml version=”1.0″ encoding=”utf-8″?> <mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml&#8221; layout=”absolute” backgroundColor=”white”> <mx:Script> <![CDATA[ <strong>import</strong> mx.collections.ArrayCollection; <strong>import</strong> mx.controls.*; [<strong>Bindable</strong>] <strong>public</strong> <strong>var</strong> arr:ArrayCollection=<strong>new</strong> ArrayCollection([{label:<strong>”User 1″</strong>, data:<strong>”1″</strong>, chkVal:<strong>false</strong>},{label:<strong>”User 2″</strong>, data:<strong>”2″</strong>, chkVal:<strong>false</strong>},{label:<strong>”User 3″</strong>, data:<strong>”3″</strong>, chkVal:<strong>false</strong>},{label:<strong>”User 4″</strong>, data:<strong>”4″</strong>, chkVal:<strong>false</strong>},{label:<strong>”User 5″</strong>, data:<strong>”5″</strong>, chkVal:<strong>false</strong>}]); <strong>public</strong> <strong>function</strong> fnChange(chk:Object):<strong>void</strong>{arr.getItemAt(dg1.selectedIndex).chkVal=CheckBox(chk).selected;} ]]></mx:Script> <mx:DataGrid x=”161″ y=”197″font-size: … Continue reading

Posted in check box, datagrid, item renderer | Tagged , , | Leave a comment