Kevin,
    I am a bit confused. Do you have other traces in the application? Can you see them? Here is tracer that I use : http://ajaxmaker.com/xpanel
    We are using cellrenderers within dynamic datagrids (layout persisted in DB) all the time - no issues there - they do have mouseDown and click handlers. I personally would not name the method "click" as it is confusing to me but would call it arrowClick().
    click event is not handled by the parent or propagated to the parent. Your control should define custom event and dispatch it to the listOwner so the parent can react on it.
HTH,
Anatole
----- Original Message -----
From: Kevin Ewok
Sent: Tuesday, February 07, 2006 10:01 AM
Subject: [flexcoders] Re: cellRenderer not recognizing click events for Custom Mxml Cell Renderer

Hello all-
  I've spent the last day now trying to get a handle of the dispatched
event from the cell renderer to the mxml file and I still cannot do
it. I've tried several of the techniques in Chapter 16 of the
"Developing Rich Clients" Flex book and still no luck.

What boggles me is that the 'click' event w/i my cell renderer mxml
file works when I use the "cellRenderer" attribute of the mx:Datagrid
tag, but it doesn't work when I apply my mxml file to the
.cellRenderer attribute of a dynamically created datagrid. Obviously
something is getting lost b/w the parent object and my mxml file where
the dispatched event does not get handled by the parent. I've tried
all sorts of fixes using 'parent' to no luck.

Does anyone know how this works? Thanks.

--- In flexcoders@yahoogroups.com, "Kevin Ewok" <[EMAIL PROTECTED]> wrote:
>
> Flexcoders -

>   I have a mxml file which is basically copy and paste from the
> TimePicker.mxml file. (except for my mxml file is just a label and a
> button). When the button is clicked, the value of the label is passed
> to the Cairngorm Controller. This works completely fine when I
> implement my mxml file within the <mx:DataGrid cellRenderer=".."/>
> attribute.
>
> However, I also have the requirement to create datagrids dynamically.
> When I create my DataGridColumn and apply my mxml file to the
> 'cellRenderer' attribute, the component appears correctly, but when I
> click the button, the method linked to my click event in the button
> never occurs.
>
> I'm implementing the "click" method within my mxml file that renders
> the label and button and I can't figure out what I'm doing wrong with
> the way the child is created. Thanks in advance.
>
> var _dgc:DataGridColumn = new DataGridColumn("newColumn");
> _dgc.cellRenderer = "com.StatusPicker";
>
> //////// com.StatusPicker.mxml////////
> <?xml version="1.0" encoding="utf-8"?>
> <mx:HBox xmlns:mx="http://www.macromedia.com/2003/mxml">
> <mx:Script>
> <![CDATA[
>      
> var btn : MovieClip;
> var listOwner : MovieClip;  
> var getCellIndex : Function;
> var getDataLabel : Function;                  
>
> function click(){
>    trace("click occured");
> }
>            
> function setValue(str:String, item:Object, selection:String):Void
> { 
>    status.text = item.STATUS;           
> }
> ]]>
> </mx:Script>
>
> <mx:Label id="status" textAlign="center" width="20"/>
> <mx:Button id="RightArrow" icon="@Embed('/images/rightarrow.png')"
> click="click()"/>
> </mx:HBox>
>






--
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




Reply via email to