So I understand that editorProperty and cellEndEdit are mutually exclusive. They both do the same but for complicated stuff we have to use cellEndEdit event hook.
But the bug is really in the cellRenderer listData object which is never set. When the datagrid is rendered for the first time, it cannot depend on cellEndEdit. It will depend on dataObject in cellRenderer to render values. And since dataObject cannot help in getting the cell indices, we need listData. And the documentation says that the cellRenderer has to implement IDropInListItemRenderer interface. But it looks like this set and get methods are never called and so my listData object is always null.
--- In [email protected], "Stephen Gilson" <[EMAIL PROTECTED]> wrote:
>
> There is an example of returning multiple results from a cell renderer
> in the Beta 1 doc at:
> http://livedocs.macromedia.com/flex/20beta1/docs/00001110.html
>
> Basically, you have to handle the cellEndEdit event, extract the data
> from the cell editor, and write it directly to the control. Please let
> me know if this example is helpful.
>
> Stephen
>
>
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of t_msreddy
> Sent: Thursday, March 16, 2006 9:59 AM
> To: [email protected]
> Subject: [flexcoders] Flex2.0 Beta BUG: cellRender/cellEditor
>
>
> I have posted this question many times in the group, but this time I
> want to put it very clearly so that people notice this problem
>
> The BUG is if you cellRenderer implements IDropInListItemRenderer (where
> you implement set and get listData methods, refer
> http://livedocs.macromedia.com/labs/1/flex/langref/index.html?mxml-tag-d
> etail.html&mxml-tags.html), its set and get listData methods are never
> invoked. So you cellRenderer's listData local var is always null.
>
> There are couple of issues here. The problem on hand is related to
> cellRenderer/cellEditor for a DataGrid. I really see no value in
> editorProperty attribute in datagrid, becuase most of times when you
> implement a cellRenderer/cellEditor it will have more than one editable
> property. So what will you set the editorProperty. They dont talk about
> this in the documentation. They only talk about simple examples which
> has only one editable property. Manish suggested that we use a composite
> label of all the editable properties in cellRenderer to set to the
> editorProperty. I am not sure how this works. When the datagrid sets the
> editorProperty, it will set the composite label and how does the
> cellRenderer know how to split this label to set the values to
> appropriate textInput fields in my cellRenderer.
>
>
> My cell renderer implements
> mx.controls.listclasses.IDropInListItemRenderer interface and implements
> set and get listData methods (see code below), this is the same code
> given in the documentation. It says all cellRenderers should implement
> these methods. I want to use listData to actually get the cell indices
> in my cellRenderer.
> // Internal variable for the property value.
> private var __listData:BaseListData;
>
> // Make the listData property bindable.
> [Bindable("dataObjectChanged")]
>
> // Define the getter method.
> public function get listData():BaseListData
> {
> trace("WeekHoursCR: get listData called");
> return __listData;
> }
>
> // Define the setter method, and dispatch an event when the
> property changes
> // to support data binding.
> public function set listData(value:! BaseListData):void
> {
> trace("WeekHoursCR: set listData called");
> __listData = value;
> //The below line causes compile error in flex2.0 beta.
> //dispatchEvent(new FlexEvent(FlexEvent.DATA_OBJECT_CHANGED));
> }
>
> // Override the setter method.
> override public function set dataObject(value:Object) : void
> {
> if(value != null) {
> ! &n! bsp;&nbs p; // Use super to set the value in the
> base class.
> super.dataObject = value;
> }
> trace("WeekHoursCR: set dataObject called ; __listData="
> + __listData);
> trace("WeekHoursCR: set dataObject called ; dataObject="
> + dataObject);
>
> }
>
> But when I trace the __listData object is always null. the set and get
> methods are never called. I think its a bug in flex2.0 Beta.
>
> If my analysis is wrong please feel free to correct me.
>
>
>
> --
> 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
> <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+
> site+design+development&w2=Computer+software+development&w3=Software+des
> ign+and+development&w4=Macromedia+flex&w5=Software+development+best+prac
> tice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ> Computer software
> development
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=We
> b+site+design+development&w2=Computer+software+development&w3=Software+d
> esign+and+development&w4=Macromedia+flex&w5=Software+development+best+pr
> actice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw> Software design and
> development
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=
> Web+site+design+development&w2=Computer+software+development&w3=Software
> +design+and+development&w4=Macromedia+flex&w5=Software+development+best+
> practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>
> Macromedia flex
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+
> development&w2=Computer+software+development&w3=Software+design+and+deve
> lopment&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1
> 66&.sig=OO6nPIrz7_EpZI36cYzBjw> Software development best
> practice
> <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&
> w1=Web+site+design+development&w2=Computer+software+development&w3=Softw
> are+design+and+development&w4=Macromedia+flex&w5=Software+development+be
> st+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>
>
> ________________________________
>
> YAHOO! GROUPS LINKS
>
>
>
> * Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> .
>
>
> ________________________________
>
--
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.

