Well, it appears you are assigning the factory correctly, but the answer
to your problem is probably in how the code operates and debuggers are
good for determining that.  All visuals get there through code and we
don't know why the code isn't setting up the visuals as expected.

 

Can you produce an example with a basic datagrid, a few lines of data
and your "simple coloured label"?

 

-Alex

 

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of vebazzo
Sent: Wednesday, January 10, 2007 2:09 AM
To: [email protected]
Subject: [flexcomponents] Re: Datagrid Item Renderer Clicking Question

 

Hello again. I didn't understand why I would use the debugger... it's
a purely visual "bug" that I am having, with the selected row not
being highlighted.

Interesting thing: it doesn't unselect the other row when I click in
the image, but the selectedIndex property changes. All images are
local. Please notice also that I tried other renderers, for example,
just a simple coloured label; and I have the same problem.

Here is the code for the creation of the renderer:

public function assignSignalRenderer(colIndex:Number):void{
var myRender:ClassFactory = new ClassFactory(DatagridSignalRenderer);
myRender.properties = { columnIndex: colIndex }
columns[colIndex].itemRenderer = myRender;
}

Thank you once more!

--- In [email protected]
<mailto:flexcomponents%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]>
wrote:
>
> If you create a sample renderer that doesn't have anything that's
> actually app-specific, can you post that?
> 
> 
> 
> Otherwise, I'd try using the debugger.
> 
> 
> 
> If another row is selected when you click on the Image, does it
> un-select that row? Are the images being loaded from another domain?
> 
> 
> 
> ________________________________
> 
> From: [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> [mailto:[email protected]
<mailto:flexcomponents%40yahoogroups.com> ] On Behalf Of vebazzo
> Sent: Monday, January 08, 2007 1:46 PM
> To: [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> Subject: [flexcomponents] Re: Datagrid Item Renderer Clicking Question
> 
> 
> 
> Hey there! Thanks for your reply! Unfortunately I am not allowed to
> post code, but there is no other mouse event handling going on. I
> think the events are happening correctly because the "itemIndex"
> property DOES change when I click in the image; it's just that the
> selected row doesn't get highlighted...
> 
> Thanks again for the help!
> 
> --- In [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> <mailto:flexcomponents%40yahoogroups.com> , "Alex Harui" <aharui@>
> wrote:
> >
> > Are you doing any mouse event handling in your renderer? If you are,
> > you might be confusing the underlying DG if you are blocking events
in
> > some way. If you can get configured to debug into the Flex source,
the
> > key methods are in ListBase.as (mouseOverHandler,
> > mouseEventToItemRenderer). 
> > 
> > 
> > 
> > If you want to post the code to your renderer, we can take a look.
> > 
> > 
> > 
> > ________________________________
> > 
> > From: [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> <mailto:flexcomponents%40yahoogroups.com> 
> > [mailto:[email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> <mailto:flexcomponents%40yahoogroups.com> ] On Behalf Of vebazzo
> > Sent: Monday, January 08, 2007 2:33 AM
> > To: [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> <mailto:flexcomponents%40yahoogroups.com> 
> > Subject: [flexcomponents] Datagrid Item Renderer Clicking Question
> > 
> > 
> > 
> > Hello, everybody.
> > 
> > I have a simple question regarding item renderers in the Data Grid.
I
> > have created a simple item renderer that replaces a cell of the Data
> > Grid with a simple image. Now I want to allow the user to select
that
> > row by clicking on the image. For some reason, the row doesn't
> > highlight (as if selected) when the user clicks on the image. If I
get
> > the "selectedIndex" property, it shows the index of the image's row;
> > but the datagrid doesn't highlight that row. If I click in another
> > column of the datagrid (a normal one, without a custom item
renderer),
> > the row gets highlighted as I want.
> > 
> > Does anybody know why this happens and how can I get around it? I
> > really want the datagrid's row to be highlighted when the user
clicks
> > in this image. I tried other types of renderers as well and the
> > problem is always the same.
> > 
> > Thank you very much!
> >
>

 

Reply via email to