<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - flash - 9.0 - ActionScriptLangRefV3 - fl/controls/dataGridClasses/DataGridCellEditor.html</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-25T14:17:56</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68696" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68583" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68582" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68581" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68696">
		<title>flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68696</link>
		<description>You can find DataGrid quickstarts here:&lt;br&gt;http://www.adobe.com/devnet/flash/quickstart/datagrid_pt1/&lt;br&gt;http://www.adobe.com/devnet/flash/quickstart/datagrid_pt2/</description>
		<dc:creator>tderich</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2007-06-19T14:46:41</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68583">
		<title>flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68583</link>
		<description>11. Select File &gt; New.&lt;br /&gt;12. In the New Document dialog box that is displayed, select ActionScript File and then click the OK button.&lt;br /&gt;13. In the script window, enter the following code to define the CustomCheckBoxCellEditor class:&lt;br /&gt;// Based on class CellRenderer by Adobe Systems Incorporated.&lt;br /&gt;package &lt;br /&gt;{&lt;br /&gt;	import fl.controls.ButtonLabelPlacement;&lt;br /&gt;	import fl.controls.CheckBox;&lt;br /&gt;	import fl.controls.DataGrid;&lt;br /&gt;	import fl.controls.dataGridClasses.DataGridColumn;&lt;br /&gt;	import fl.controls.LabelButton;&lt;br /&gt;	import fl.controls.listClasses.CellRenderer;&lt;br /&gt;	import fl.controls.listClasses.ListData;&lt;br /&gt;	import fl.controls.listClasses.ICellRenderer;&lt;br /&gt;	import fl.core.InvalidationType;&lt;br /&gt;	import fl.core.UIComponent;&lt;br /&gt;	import fl.data.DataProvider;&lt;br /&gt;	import flash.display.DisplayObject;&lt;br /&gt;	import flash.events.Event;&lt;br /&gt;	import flash.events.MouseEvent;&lt;br /&gt;	import flash.system.IME;&lt;br /&gt;	&lt;br /&gt;    [Style(name=&quot;icon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;upIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;downIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;overIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;disabledIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedDisabledIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedUpIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedDownIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedOverIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;upSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;downSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;overSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;disabledSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedDisabledSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedUpSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedDownSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedOverSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;textFormat&quot;, type=&quot;flash.text.TextFormat&quot;)]&lt;br /&gt;    [Style(name=&quot;disabledTextFormat&quot;, type=&quot;flash.text.TextFormat&quot;)]&lt;br /&gt;    [Style(name=&quot;textPadding&quot;, type=&quot;Number&quot;, format=&quot;Length&quot;)]&lt;br /&gt;&lt;br /&gt;	public class CustomCheckBoxCellEditor extends CheckBox implements ICellRenderer {&lt;br /&gt;		public var text:String;&lt;br /&gt;		protected var _listData:ListData;&lt;br /&gt;		protected var _data:Object;&lt;br /&gt;		protected var _rowSelected:Boolean = true;&lt;br /&gt;		protected var _showLabel:Boolean = false;&lt;br /&gt;		protected var item_dg:DataGrid;&lt;br /&gt;&lt;br /&gt;		public function CustomCheckBoxCellEditor():void {&lt;br /&gt;			super();&lt;br /&gt;			focusEnabled = false;&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		private  static var defaultStyles:Object = {  icon:null,&lt;br /&gt;													  upIcon:&quot;CheckBox_upIcon&quot;,downIcon:&quot;CheckBox_downIcon&quot;,overIcon:&quot;CheckBox_overIcon&quot;,&lt;br /&gt;													  disabledIcon:&quot;CheckBox_disabledIcon&quot;,&lt;br /&gt;													  selectedDisabledIcon:&quot;CheckBox_selectedDisabledIcon&quot;,&lt;br /&gt;													  focusRectSkin:null,&lt;br /&gt;													  focusRectPadding:null,&lt;br /&gt;													  selectedUpIcon:&quot;CheckBox_selectedUpIcon&quot;,selectedDownIcon:&quot;CheckBox_selectedDownIcon&quot;,selectedOverIcon:&quot;CheckBox_selectedOverIcon&quot;,&lt;br /&gt;													  upSkin:&quot;CellRenderer_upSkin&quot;,downSkin:&quot;CellRenderer_downSkin&quot;,overSkin:&quot;CellRenderer_overSkin&quot;,&lt;br /&gt;													  disabledSkin:&quot;CellRenderer_disabledSkin&quot;,&lt;br /&gt;													  selectedDisabledSkin:&quot;CellRenderer_selectedDisabledSkin&quot;,&lt;br /&gt;													  selectedUpSkin:&quot;CellRenderer_selectedUpSkin&quot;,selectedDownSkin:&quot;CellRenderer_selectedDownSkin&quot;,selectedOverSkin:&quot;CellRenderer_selectedOverSkin&quot;,&lt;br /&gt;													  textFormat:null,&lt;br /&gt;													  disabledTextFormat:null,&lt;br /&gt;													  embedFonts:null,&lt;br /&gt;													  textPadding:5  };&lt;br /&gt;		public static function getStyleDefinition():Object { return defaultStyles; }&lt;br /&gt;		&lt;br /&gt;		override public function setSize(width:Number,height:Number):void {&lt;br /&gt;			super.setSize(width, height);			&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		public function get listData():ListData {&lt;br /&gt;			return _listData;&lt;br /&gt;		}	&lt;br /&gt;&lt;br /&gt;		public function set listData(value:ListData):void {&lt;br /&gt;			_listData = value;&lt;br /&gt;			text = _listData.label;&lt;br /&gt;			label = (_showLabel)? _listData.label : &quot;&quot;;&lt;br /&gt;			setStyle(&quot;icon&quot;, _listData.icon);&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		public function get data():Object {&lt;br /&gt;			return _data;&lt;br /&gt;		}		&lt;br /&gt;&lt;br /&gt;		public function set data(value:Object):void {&lt;br /&gt;			_data = value;&lt;br /&gt;			swapValue();&lt;br /&gt;			drawNow();&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		public function get imeMode():String {&lt;br /&gt;			return _imeMode;&lt;br /&gt;		}		&lt;br /&gt;&lt;br /&gt;		public function set imeMode(value:String):void {&lt;br /&gt;			_imeMode = value;&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;		override public function get selected():Boolean {&lt;br /&gt;			return super.selected;&lt;br /&gt;		}&lt;br /&gt;		 &lt;br /&gt;		override public function set selected(value:Boolean):void {&lt;br /&gt;			swapValue();&lt;br /&gt;			_rowSelected = value;&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		private function swapValue():void {&lt;br /&gt;			var newValue:Boolean;&lt;br /&gt;		 // Get the name of the field in the data provider item associated with &lt;br /&gt;		 // the column being rendered&lt;br /&gt;		    item_dg = this.parent.parent.parent as DataGrid;&lt;br /&gt;			var field_str:String = item_dg.getColumnAt(_listData.column).dataField;&lt;br /&gt;		 // Make sure the proper boolean value is set&lt;br /&gt;			(_data[field_str]==&quot;true&quot; || _data[field_str]==1 || _data[field_str]==true)?&lt;br /&gt;				newValue = false : newValue = true;&lt;br /&gt;		 // Update CellRenderer's appropriate values&lt;br /&gt;			super.selected = newValue;		// Status of the CheckBox&lt;br /&gt;			text = String(newValue);		// text property required to act as a DataGridCellEditor &lt;br /&gt;		 // The ListData object that handles the properties applied to the cell&lt;br /&gt;			_listData = new ListData(String(newValue),&lt;br /&gt;									 _listData.icon,&lt;br /&gt;									 _listData.owner,&lt;br /&gt;									 _listData.index,&lt;br /&gt;									 _listData.row,&lt;br /&gt;									 _listData.column);&lt;br /&gt;		 // The DataGrid.dataProvider's item associated to the cell&lt;br /&gt;			item_dg.editField(_listData.row,&lt;br /&gt;							  field_str,&lt;br /&gt;							  newValue);&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		override protected function toggleSelected(event:MouseEvent):void {&lt;br /&gt;		 // don't set selected or dispatch change event.&lt;br /&gt;			swapValue();&lt;br /&gt;		 // Initiate an immediate draw operation&lt;br /&gt;			drawNow();&lt;br /&gt;		}&lt;br /&gt;	&lt;br /&gt;		override protected function drawLayout():void {&lt;br /&gt;			var textPadding:Number = Number(getStyleValue(&quot;textPadding&quot;));&lt;br /&gt;			var textFieldX:Number = 0;&lt;br /&gt;			// Align icon&lt;br /&gt;			if (icon != null) {&lt;br /&gt;				icon.x = textPadding;&lt;br /&gt;				icon.y = Math.round((height-icon.height)&gt;&gt;1);&lt;br /&gt;				textFieldX = icon.width + textPadding;&lt;br /&gt;			}&lt;br /&gt;			// Align text&lt;br /&gt;			if (label.length &gt; 0) {&lt;br /&gt;				textField.visible = true;&lt;br /&gt;				var textWidth:Number =  Math.max(0, width - textFieldX - textPadding*2);&lt;br /&gt;				textField.width = textWidth;&lt;br /&gt;				textField.height = textField.textHeight + 4;&lt;br /&gt;				textField.x = textFieldX + textPadding&lt;br /&gt;				textField.y = Math.round((height-textField.height)&gt;&gt;1);&lt;br /&gt;			} else {&lt;br /&gt;				textField.visible = false;&lt;br /&gt;			}&lt;br /&gt;			// Size background&lt;br /&gt;			background.width = width;&lt;br /&gt;			background.height = height;&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		override protected function drawBackground():void{&lt;br /&gt;			var styleName:String = (enabled) ? mouseState : &quot;disabled&quot;;&lt;br /&gt;			if (_rowSelected) {&lt;br /&gt;				styleName = &quot;selected&quot;+styleName.substr(0,1).toUpperCase()+styleName.substr(1); &lt;br /&gt;			}&lt;br /&gt;			styleName += &quot;Skin&quot;;&lt;br /&gt;			var bg:DisplayObject = background;&lt;br /&gt;			background = getDisplayObjectInstance(getStyleValue(styleName));&lt;br /&gt;			addChildAt(background, 0);&lt;br /&gt;			if (bg != null &amp;&amp; bg != background) { removeChild(bg); }&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;}</description>
		<dc:creator>amadurell</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-06-18T05:09:43</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68582">
		<title>flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68582</link>
		<description>8. Select File &gt; New.&lt;br /&gt;9. In the New Document dialog box that is displayed, select ActionScript File and then click the OK button.&lt;br /&gt;10. In the script window, enter the following code to define the CustomCheckBoxCellRenderer class:&lt;br /&gt;// Based on class CellRenderer by Adobe Systems Incorporated.&lt;br /&gt;package &lt;br /&gt;{&lt;br /&gt;	import fl.controls.ButtonLabelPlacement;&lt;br /&gt;	import fl.controls.DataGrid;&lt;br /&gt;	import fl.controls.dataGridClasses.DataGridColumn;&lt;br /&gt;	import fl.controls.listClasses.ListData;&lt;br /&gt;	import fl.controls.listClasses.ICellRenderer;&lt;br /&gt;	import fl.controls.LabelButton;&lt;br /&gt;	import fl.core.UIComponent;&lt;br /&gt;	import flash.events.Event;&lt;br /&gt;	import flash.events.MouseEvent;&lt;br /&gt;	import fl.controls.CheckBox;&lt;br /&gt;	import fl.controls.listClasses.CellRenderer;&lt;br /&gt;	import flash.display.DisplayObject;&lt;br /&gt;	&lt;br /&gt;    [Style(name=&quot;icon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;upIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;downIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;overIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;disabledIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedDisabledIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedUpIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedDownIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedOverIcon&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;upSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;downSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;overSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;disabledSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedDisabledSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedUpSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedDownSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;selectedOverSkin&quot;, type=&quot;Class&quot;)]&lt;br /&gt;    [Style(name=&quot;textFormat&quot;, type=&quot;flash.text.TextFormat&quot;)]&lt;br /&gt;    [Style(name=&quot;disabledTextFormat&quot;, type=&quot;flash.text.TextFormat&quot;)]&lt;br /&gt;    [Style(name=&quot;textPadding&quot;, type=&quot;Number&quot;, format=&quot;Length&quot;)]&lt;br /&gt;&lt;br /&gt;	public class CustomCheckBoxCellRenderer extends CheckBox implements ICellRenderer {&lt;br /&gt;		protected var _listData:ListData;&lt;br /&gt;		protected var _data:Object;&lt;br /&gt;		protected var _rowSelected:Boolean;&lt;br /&gt;		protected var _showLabel:Boolean = false; // Change this to true if you want the label to be shown&lt;br /&gt;&lt;br /&gt;		public function CustomCheckBoxCellRenderer():void {&lt;br /&gt;			super();&lt;br /&gt;			focusEnabled = false;&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		private  static var defaultStyles:Object = {  icon:null,&lt;br /&gt;													  upIcon:&quot;CheckBox_upIcon&quot;,downIcon:&quot;CheckBox_downIcon&quot;,overIcon:&quot;CheckBox_overIcon&quot;,&lt;br /&gt;													  disabledIcon:&quot;CheckBox_disabledIcon&quot;,&lt;br /&gt;													  selectedDisabledIcon:&quot;CheckBox_selectedDisabledIcon&quot;,&lt;br /&gt;													  focusRectSkin:null,&lt;br /&gt;													  focusRectPadding:null,&lt;br /&gt;													  selectedUpIcon:&quot;CheckBox_selectedUpIcon&quot;,selectedDownIcon:&quot;CheckBox_selectedDownIcon&quot;,selectedOverIcon:&quot;CheckBox_selectedOverIcon&quot;,&lt;br /&gt;													  upSkin:&quot;CellRenderer_upSkin&quot;,downSkin:&quot;CellRenderer_downSkin&quot;,overSkin:&quot;CellRenderer_overSkin&quot;,&lt;br /&gt;													  disabledSkin:&quot;CellRenderer_disabledSkin&quot;,&lt;br /&gt;													  selectedDisabledSkin:&quot;CellRenderer_selectedDisabledSkin&quot;,&lt;br /&gt;													  selectedUpSkin:&quot;CellRenderer_selectedUpSkin&quot;,selectedDownSkin:&quot;CellRenderer_selectedDownSkin&quot;,selectedOverSkin:&quot;CellRenderer_selectedOverSkin&quot;,&lt;br /&gt;													  textFormat:null,&lt;br /&gt;													  disabledTextFormat:null,&lt;br /&gt;													  embedFonts:null,&lt;br /&gt;													  textPadding:5  };&lt;br /&gt;		public static function getStyleDefinition():Object { return defaultStyles; }&lt;br /&gt;		&lt;br /&gt;		override public function setSize(width:Number,height:Number):void {&lt;br /&gt;			super.setSize(width, height);			&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		public function get listData():ListData {&lt;br /&gt;			return _listData;&lt;br /&gt;		}	&lt;br /&gt;&lt;br /&gt;		public function set listData(value:ListData):void {&lt;br /&gt;			_listData = value;&lt;br /&gt;			label = (_showLabel)? _listData.label : &quot;&quot;;&lt;br /&gt;			setStyle(&quot;icon&quot;, _listData.icon);&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		public function get data():Object {&lt;br /&gt;			return _data;&lt;br /&gt;		}		&lt;br /&gt;&lt;br /&gt;		public function set data(value:Object):void {&lt;br /&gt;			_data = value;&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		override public function get selected():Boolean {&lt;br /&gt;			return super.selected;&lt;br /&gt;		}&lt;br /&gt;		 &lt;br /&gt;		override public function set selected(value:Boolean):void {&lt;br /&gt;		 // Get the name of the field in the data provider item associated with &lt;br /&gt;		 // the column being rendered&lt;br /&gt;		    var item_dg:DataGrid = this.parent.parent.parent as DataGrid;&lt;br /&gt;			var field_str:String = item_dg.getColumnAt(_listData.column).dataField;&lt;br /&gt;		 // Make sure the proper boolean value is set&lt;br /&gt;			(_data[field_str]==&quot;true&quot; || _data[field_str]==1 || _data[field_str]==true)?&lt;br /&gt;				super.selected=true : super.selected=false;&lt;br /&gt;			_rowSelected = value;&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		override protected function toggleSelected(event:MouseEvent):void {&lt;br /&gt;			// don't set selected or dispatch change event.&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		override protected function drawLayout():void {&lt;br /&gt;			var textPadding:Number = Number(getStyleValue(&quot;textPadding&quot;));&lt;br /&gt;			var textFieldX:Number = 0;&lt;br /&gt;			// Align icon&lt;br /&gt;			if (icon != null) {&lt;br /&gt;				icon.x = textPadding;&lt;br /&gt;				icon.y = Math.round((height-icon.height)&gt;&gt;1);&lt;br /&gt;				textFieldX = icon.width + textPadding;&lt;br /&gt;			}&lt;br /&gt;			// Align text&lt;br /&gt;			if (label.length &gt; 0) {&lt;br /&gt;				textField.visible = true;&lt;br /&gt;				var textWidth:Number =  Math.max(0, width - textFieldX - textPadding*2);&lt;br /&gt;				textField.width = textWidth;&lt;br /&gt;				textField.height = textField.textHeight + 4;&lt;br /&gt;				textField.x = textFieldX + textPadding&lt;br /&gt;				textField.y = Math.round((height-textField.height)&gt;&gt;1);&lt;br /&gt;			} else {&lt;br /&gt;				textField.visible = false;&lt;br /&gt;			}&lt;br /&gt;			// Size background&lt;br /&gt;			background.width = width;&lt;br /&gt;			background.height = height;&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		override protected function drawBackground():void{&lt;br /&gt;			var styleName:String = (enabled) ? mouseState : &quot;disabled&quot;;&lt;br /&gt;			if (_rowSelected) {&lt;br /&gt;				styleName = &quot;selected&quot;+styleName.substr(0,1).toUpperCase()+styleName.substr(1); &lt;br /&gt;			}&lt;br /&gt;			styleName += &quot;Skin&quot;;&lt;br /&gt;			var bg:DisplayObject = background;&lt;br /&gt;			background = getDisplayObjectInstance(getStyleValue(styleName));&lt;br /&gt;			addChildAt(background, 0);&lt;br /&gt;			if (bg != null &amp;&amp; bg != background) { removeChild(bg); }&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;(continues in next post)</description>
		<dc:creator>amadurell</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-06-18T05:07:57</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68581">
		<title>flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/dataGridClasses/DataGridCellEditor.html#68581</link>
		<description>Here's an example of an editable DataGrid using custom CellRenderers to display and edit one of its columns using a CheckBox.&lt;br /&gt;&lt;br /&gt;1. Select File &gt; New.&lt;br /&gt;2. In the New Document dialog box that is displayed, select Flash File (ActionScript 3.0), and then click OK.&lt;br /&gt;3. Select Window &gt; Components to display the Components panel.&lt;br /&gt;4. In the Components panel, drag a CheckBox and a DataGrid components to the Library.&lt;br /&gt;5. Select Frame 1 of Layer 1 in the Timeline, and select Window &gt; Actions.&lt;br /&gt;6. Type the following script in the Actions panel:&lt;br /&gt;import fl.controls.DataGrid;&lt;br /&gt;import fl.data.DataProvider;&lt;br /&gt;var myDP:DataProvider = new DataProvider;&lt;br /&gt;myDP.addItem({fname:&quot;John&quot;, lname:&quot;Doe&quot;, acp:true});&lt;br /&gt;myDP.addItem({fname:&quot;Jane&quot;, lname:&quot;Doe&quot;, acp:false});&lt;br /&gt;myDP.addItem({fname:&quot;Gene&quot;, lname:&quot;Doe&quot;, acp:false});&lt;br /&gt;myDP.addItem({fname:&quot;Ginny&quot;, lname:&quot;Doe&quot;, acp:true});&lt;br /&gt;var myDG:DataGrid = new DataGrid();&lt;br /&gt;myDG.width = 300;&lt;br /&gt;myDG.height = 105;&lt;br /&gt;myDG.x = (stage.stageWidth - myDG.width)/2;&lt;br /&gt;myDG.y = (stage.stageHeight - myDG.height)/2;&lt;br /&gt;myDG.addColumn(&quot;fname&quot;);&lt;br /&gt;myDG.addColumn(&quot;lname&quot;);&lt;br /&gt;myDG.addColumn(&quot;acp&quot;);&lt;br /&gt;myDG.getColumnAt(0).headerText = &quot;First Name&quot;;&lt;br /&gt;myDG.getColumnAt(1).headerText = &quot;Last Name&quot;;&lt;br /&gt;myDG.getColumnAt(2).headerText = &quot;ACP&quot;;&lt;br /&gt;myDG.getColumnAt(2).cellRenderer = CustomCheckBoxCellRenderer;&lt;br /&gt;myDG.getColumnAt(2).itemEditor = CustomCheckBoxCellEditor;&lt;br /&gt;myDG.editable = true;&lt;br /&gt;myDG.dataProvider = myDP;&lt;br /&gt;addChild(myDG);&lt;br /&gt;7. Select File &gt; Save. Give the file a name and click the OK button.&lt;br /&gt;(continues in next post)</description>
		<dc:creator>amadurell</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-06-18T05:06:06</dc:date>
	</item>
	</rdf:RDF>

