Checkbox itemrenderer in datagrid

January 5, 2012

The selected property of the checkbox has to be bounded with the selected property of our entity,  Itemrenderer doesn’t keep track of the selected states correctly this can be fixed by binding data with selected property.Freelance Flash Flex developer India Bangalore

The below code explains the itemrender file called DGCheckBoxEditor

import mx.controls.listClasses.ListData;
import mx.controls.dataGridClasses.DataGridListData;
import mx.controls.listClasses.BaseListData;
import mx.controls.dataGridClasses.DataGridItemRenderer

private var _listData:DataGridListData;
// Define a property for returning the new value to the cell.
public var cbSelected:Boolean;

// Implement the drawFocus() method for the VBox.
override public function drawFocus(draw:Boolean):void {

override public function set data(value:Object):void{ = value;

override public function get data():Object {

public function get listData():BaseListData
return _listData;

public function set listData(value:BaseListData):void
_listData = DataGridListData(value);


<mx:CheckBox id=”followUpCB”
change=”cbSelected=followUpCB.selected” paddingLeft=”15″/>

Code to call the itemrender

<mx:DataGrid id=”myGrid”
dataProvider=”{myAC}” editable=”true” >
<mx:DataGridColumn id=”checker” dataField=”FollowUp”
itemRenderer=”DGCheckBoxEditor” rendererIsEditor=”true”
<mx:DataGridColumn id=”checker1″ dataField=”Contact” width=”150″ />
<mx:DataGridColumn dataField=”id” width=”150″ editable=”false”/>


What we do

December 1, 2008

We are into new media development with high quality of innovation and skill. We create applications that not only fulfill the purpose but wow and impress the user/visitor. Our basic idea is in redefining the way people interact with web through introduction of highly advanced, yet affordable, customized solutions.

We provide services in Flex and Flash development, E-learning, graphic design and multimedia. We always push the envelope for a fresh new look. We recognize that every client is unique that is why we provide the highest level of creativity and client service.

We’ll take the time to know the details of your business to ensure that we exceed your expectations. Direct principle and project manager involvement is possible throughout all phases of the project to ensure the highest quality. You have our commitment not only to quality but to the highest level of customer service.

The bottom line, We build innovative and scalable strategies that harness the power of the web for your business and offer to you extremely profitable & cooperative conditions through strong resources and highly qualified & experienced manpower.