I'm not sure if you can use a cellRenderer, but you could at least use
labelfunction to alter each cell as they were set. 

http://www.asfusion.com/blog/entry/using-labelfunction-to-format-cfgrid 

Cheers,

Kevin

-----Original Message-----
From: Brad Wood [mailto:[EMAIL PROTECTED] 
Sent: January 10, 2006 11:52 AM
To: CF-Talk
Subject: RE: action script copy by value

Thanks Kevin.  

I had assumed that Cold Fusion simply assigned a special cellRenderer to
that column to generate the check box.  The only think is, I don't have
access to the code in that cellRenderer since it is encapsulated in the
cfgridcolumn tag.  I don't know if it is possible to modify the
cellRenderer after the form loads, or if all of its internal methods are
private.  I have a feeling that the current cellRenderer is eating the
click event and not passing it along to the grid.  If I could find an
already-made checkbox cellRenderer then I could to use that one instead
and then have the ability to tweak the code.  I'm not sure where to look
online a pre-built example of something like that.  If I were to have
code I could modify I would do a lot better than having to write
something myself.


~Brad

-----Original Message-----
From: Kevin Aebig [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 11:30 AM
To: CF-Talk
Subject: RE: action script copy by value

"The biggest still being how on Earth to attach a click listener to
checkbox
in a cfgrid when using <cfgridcolumn type="Boolean">"

-- I haven't dove too deep into Flash Forms (Flex2 is my next endeavor),
so
I might be off in left field...

>From within Flash, to even get a checkbox or anything other than
plaintext
into a datagrid cell, you have to use a custom cell renderer. This
"renderer" is really just a class that receives the data for the cell
and
provides the layout and even capabilities for the cell. Within this
class,
you could further alter how events are handled. 

Here's my quick fix for this. If you can get any event at all for the
contents of the cell, than trigger the event for the other or simply
include
the event's callback within only 1 handler and act accordingly.

So if you had...

function handleCKBox ():Void {
        trace ("Checkbox clicked");
}
function handleCell ():Void {
        trace ("Cell clicked");
}

Than you could just combine them and use conditionals to handle it...

function handleEvent ():Void
{
        trace ("Checkbox clicked");
        trace ("Cell clicked");
}

Cheers,

Kevin

-----Original Message-----
From: Brad Wood [mailto:[EMAIL PROTECTED] 
Sent: January 10, 2006 10:53 AM
To: CF-Talk
Subject: RE: action script copy by value

Kevin, thank you very much for your help.  

--The statement above is using the remoting bindings and 'results'
refers to
an object, not an array. 

That makes perfect sense.  I had just assumed that the results object
would be a list-based object and inherit the length property etc...
Other than looping, why other way IS there to copy the grid items when
the dataProvider is bound to the object returned by remoting?

--Short answer... no. Long answer... by subclassing the datagrids
classes
and than extending the columns class, you could do it. Of course you'd
need
a pretty deep knowledge of the AS2 framework and UIObject though...

Cool.  I figured as much.  At first I was hoping maybe someone else had
done that before and would have a copy and paste answer-- but I get the
impression a lot of people really haven't dived too deep into pushing
flash forms to the limits. :)

Maybe you can answer some of my other quandaries I have found.  The
biggest still being how on Earth to attach a click listener to checkbox
in a cfgrid when using <cfgridcolumn type="Boolean">  I have attaching
every listener to the grid itself with zero luck.  The check box always
eats the event and doesn't pass it along to cellClick or cellPress.

~Brad








~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229061
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to