Search Flex Components Free

Custom Search

December 25, 2007

Flex Cell Renderers Control Drop In CheckBox Source Code

Flex Sample Source Code:

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp()" backgroundAlpha="0">

<mx:Script>

import mx.collections.*;

[Bindable]
public var choices:ArrayCollection;

private function initApp():void
{
choices = new ArrayCollection([
{sales: true, location: "San Francisco"},
{sales: true, location: "Bangalore"},
{sales: false, location: "Singapore"},
{sales: true, location: "Newton"}
]);
}

</mx:Script>

<mx:DataGrid dataProvider="{choices}" width="300" editable="true">
<mx:columns>
<mx:Array>
<mx:DataGridColumn dataField="location" headerText="Office Location"></mx:DataGridColumn>
<mx:DataGridColumn dataField="sales" headerText="Sales Organization" itemRenderer="mx.controls.CheckBox" rendererIsEditor="true" editorDataField="selected" />
</mx:Array>
</mx:columns>
</mx:DataGrid>

</mx:Application>






Related Flex Tutorials