Thanks, this has fixed the exception. However I am still getting really odd behavior of the checkbox. The first time I click the row it doesn't do anything (I.E. the state of the checkbox doesn't change) only if I click the same row again does it change. AND while the focus is on that row, clicking the checkbox on and off doesn't cause the CELL_END_EDIT event. Only when the focus leaves the checkbox (like by clicking a different row) will it call the CELL_END_EDIT event.
I noticed this behavior is different from your sample application, and the difference is that your DataGrid itself is set to editable="false", and the one column is set to editable="true". How is this supposed to work? If I set my data grid up like yours, I don't get any of the CELL_FOCUS_IN, CELL_END_EDIT, and CELL_FOCUS_OUT events. Below is your sample app that I tweaked a little (I set the data grid to editable="true" and added event handlers to log the cell focus and cell end edit events. You can see how you must click the checkbox twice to actually change it's value. thanks, Thunder //------------------------------- <?xml version="1.0" encoding="iso-8859-1"?> <mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" width="600" height="600" > <mx:Script> <![CDATA[ import mx.controls.gridclasses.*; import mx.events.DataGridEvent; [Bindable] public var myarr:Array=[{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"false"},{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"false"},{description:"one",product:"true"},{description:"one",product:"true"}] public function focusIn(event:DataGridEvent):void { log.text += "\nFocus In - Row: " + event.rowIndex + " Column: " + event.columnIndex + " reason: " + event.reason + " selected: " + Object(event.cell).selected; } public function focusOut(event:DataGridEvent):void { log.text += "\nFocus Out - Row: " + event.rowIndex + " Column: " + event.columnIndex + " reason: " + event.reason + " selected: " + Object(event.cell).selected; } public function cellEdited(event:DataGridEvent):void { log.text += "\nCell Edited - Row: " + event.rowIndex + " Column: " + event.columnIndex + " reason: " + event.reason + " selected: " + Object(event.cell).selected; } ]]> </mx:Script> <mx:DataGrid dataProvider="{myarr}" id="myDataGrid2" width="100%" height="250" variableRowHeight="true" wordWrap="true" editable="true" dropEnabled="true" cellFocusIn="focusIn(event)" cellFocusOut="focusOut(event)" cellEndEdit="cellEdited(event)"> <mx:columns> <mx:Array> <mx:DataGridColumn headerText="Column4" columnName="description" cellRenderer="mx.controls.CheckBox" editable="true" isCellEditor="true" editorProperty="selected" /> <mx:DataGridColumn headerText="Column5" columnName="product" /> <mx:DataGridColumn headerText="Price" visible="true" columnName="price" /> </mx:Array> </mx:columns> </mx:DataGrid> <mx:TextArea width="403" height="232" editable="false" id="log" wordWrap="false"/> </mx:Application> --- In [email protected], Harish Sivaramakrishnan <[EMAIL PROTECTED]> wrote: > > Hi, > > In addition to setting the isCellEditor=true flag you > also need to set editorProperty=selected for your > code to function correctly with a > checkBoxCellRenderer. In your code, since the editable > is set to true, clicking on the Datagrid cell tries to > bring the default editor which is the textinput since > the editorproperty is not set. > > There is a known issue about the checkbox selections > getting messed up on scrolling after selecting the > checkboxes, which is currently under investigation. > > Please have a look at the code below, This works > without the runtime error: > > //------------------------------------ > <?xml version="1.0" encoding="iso-8859-1"?> > <mx:Application > xmlns:mx="http://www.macromedia.com/2005/mxml" > width="600" height="600" > > <mx:Script> > <![CDATA[ > import mx.controls.gridclasses.*; > [Bindable] > public var > myarr:Array=[{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"false"},{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"true"},{description:"one",product:"false"},{description:"one",product:"true"},{description:"one",product:"true"}] > ]]> > </mx:Script> > <mx:DataGrid dataProvider="{myarr}" > id="myDataGrid2" width="100%" height="250" > variableRowHeight="true" wordWrap="true" > editable="false" dropEnabled="true"> > <mx:columns> > <mx:Array> > <mx:DataGridColumn headerText="Column4" > columnName="description" > cellRenderer="mx.controls.CheckBox" editable="true" > isCellEditor="true" editorProperty="selected"/> > <mx:DataGridColumn headerText="Column5" > columnName="product" /> > <mx:DataGridColumn headerText="Price" > visible="true" columnName="price" /> > </mx:Array> > </mx:columns> > </mx:DataGrid> > </mx:Application> > //-------------------------------------------- > > > Hope this helps! > > Thanks, > Harish > Flex-QA > Adobe India. > > > > > --- thunderstumpgesatwork <[EMAIL PROTECTED]> > wrote: > > > --------------------------------- > Hi all, I have set up a "selected" column in a > datagrid and am using a > checkbox as the cell editor. Clicking around on > different rows of the > datagrid produced this error: > > ReferenceError: Error #1069: Property text not found > on > mx.controls.CheckBox and there is no default value > at > mx.controls::DataGrid/mx.controls:DataGrid::cellEditorCellEndEditHandler()[C:\dev\beta1\sdk\frameworks\mx\controls\DataGrid.as:4311] > at flash.events::EventDispatcher/dispatchEvent() > at > mx.controls::DataGrid/endEdit()[C:\dev\beta1\sdk\frameworks\mx\controls\DataGrid.as:3089] > at > mx.controls::DataGrid/mouseDownHandler()[C:\dev\beta1\sdk\frameworks\mx\controls\DataGrid.as:3618] > > The column definition is as such: > <mx:DataGridColumn width="15" id="MergeItemSel" > headerText=" " > cellRenderer="mx.controls.CheckBox" editable="true" > isCellEditor="true" columnName="selected" /> > > Any ideas? Is this a known bug? > > thanks, > Thunder > > > > > > -- > 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. > > > --------------------------------- > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

