http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href="">
i had to impliment this recently. You have to set up a
itemEditEnd handler.
DK
On 8/8/06, Shannon Hicks <
[EMAIL PROTECTED]> wrote:
So, using code previously sent to flexcoders, I've implemented a dataGrid with a centered checkbox. The problem is, when I check the checkboxes, the dataProvider data does not update.Anyone see why? Here's the checkbox code:public class CheckBox extends mx.controls.CheckBox {
mx_internal override function layoutContents(unscaledWidth:Number,unscaledHeight:Number,offset:Boolean):void {
super.layoutContents(unscaledWidth, unscaledHeight, offset);
if (!label)
switch (getStyle("textAlign")) {
case "center":
currentIcon.x = ( unscaledWidth - currentIcon.width)/2 ;
break;
}
}
public var onValue:Object = "1";
public var offValue:Object = "0";public function set value(o:Object) :void {
selected = (o == onValue);
}public function get value():Object {
return selected?onValue:offValue;
}
override public function set data(item:Object):void {
super.data = ""> if( item!=null )
value = item[DataGridListData(listData).dataField];
}
}The dataGrid is created dynamically....for (var i:Number=0;i<asProducts.length;i++) {
thisColumn = new DataGridColumn();
thisColumn.dataField = "prod" + asProducts.getItemAt(i).productID.toString();
thisColumn.setStyle("textAlign","center");
thisColumn.width = 100;
thisColumn.headerText = asProducts.getItemAt(i).productName;
thisColumn.headerText = thisColumn.headerText.replace("&","&");
thisColumn.itemRenderer = cf;
thisColumn.rendererIsEditor = true;
newColumns.push(thisColumn);
dgStoreStates.columns = newColumns;
}
Shan
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it? __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___

