The DataGridCoumn.editorDataField defaults to 'text' when not set. If you
are using a component that does not use the text property, you will need to
explicitly set it. In the case of a NumericStepper, you would set it to
'value'.

Best Regards,
...aaron

On 11/23/07, luciddream54321 <[EMAIL PROTECTED]> wrote:
>
>   I should also mention the SDK I'm using is Flex 3 M3 (Beta 2)
>
>
> --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
> "luciddream54321" <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I have an editable DataGrid and have specified a function to handle
> > the itemEditEnd event. One of the columns is using a NumericStepper
> > as an itemEditor. When I edit that column I get a run-time error when
> > the itemEditEnd event fires because it appears Flex is trying to
> > access the column's "text" property which doesn't exist with a
> > NumericStepper.
> >
> > This problem isn't limited to NumericStepper but also
> > occurs when I use a DateField and surely other itemEditors as well.
> > What do I need to do to prevent this from happening?
> >
> > This is the error I get when I click out of the column after editing it:
> >
> > ReferenceError: Error #1069: Property text not found on
> > mx.controls.NumericStepper and there is no default value.
> >
> > Here is an example application to illustrate the problem:
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> > layout="absolute">
> > <mx:Script>
> > <![CDATA[
> > import mx.collections.ArrayCollection;
> >
> > [Bindable]
> > public var numbers:ArrayCollection = new
> > ArrayCollection([{number:1}, {number:2}]);
> >
> > public function onItemEditEnd(event:Event):void
> > {
> > // Flex will crash before it gets here
> > }
> > ]]>
> > </mx:Script>
> >
> > <mx:DataGrid dataProvider="{numbers}"
> > itemEditEnd="onItemEditEnd(event)" editable="true">
> > <mx:columns>
> > <mx:DataGridColumn dataField="number"
> > itemEditor="mx.controls.NumericStepper" />
> > </mx:columns>
> > </mx:DataGrid>
> > </mx:Application>
> >
>
>  
>



-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com

Reply via email to