So you want all data in the grid to be bold? Then you should be able to
just set the style on the grid instead of setting it on each row. 

As for cell renderers, yes yes and yes. It renders on a cell basis and
can modify the display based on the data returned for that cell. And you
can include pictures if you want to! You can create child objects of any
type (I assume there are some objects that grid cells do not support
though).

The best way to start is to pull up the much used check cell renderer.
It displays a checkbox for each cell and checks/unchecks based on a
conditional of the data returned for that cell. Once you have the cell
renderer class done, just set the cellRenderer property on your
dataColumn to be your new class.

|<

Karl Johnson
Cynergy Systems, Inc.
http://www.cynergysystems.com
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Ryan Pieszak
Sent: Friday, April 14, 2006 10:42 AM
To: [email protected]
Subject: [flexcoders] Re: Flex2 Beta2 - Looping through dataGrid to bold
cells

Hey Karl, thanks for the quick response!

Ideally, I'd like certain rows to be bold when the data is populated,
but I don't know how to do that.  So, I'd like to bold the cells as soon
as the data is displayed.  I never want the user to see the data in the
dataGrid without the bold text.

I'm really curious about this custom cell renderer.  Can it go to the
cell level, or just row?  Can I include pictures???  Can all this be
done on a conditional basis (the value of the cell)?

I can't find a Beta2 link for it, everything is Beta1, except for
this...
http://livedocs.macromedia.com/labs/1/flex20beta2/wwhelp/wwhimpl/commo
n/html/wwhelp.htm?context=LiveDocs_Parts&file=00000123.html#142625
...which is clearly no help.  Any links would be greatly appreciated.

Thanks.

--- In [email protected], "Karl Johnson" <[EMAIL PROTECTED]>
wrote:
>
> To set the style to bold, you will most likely want to do 
> item.setStyle("fontWeight", "bold"); (I have not tested it 
> specifically on this object type, but that is
what
> it would be on any object that does support it). 
> 
> When do you need to set rows to bold? Does it always happen as soon
as
> the dataprovider is set/the grid shows data? Then you should go the 
> custom cell renderer rout. Then you can do anything you want to each 
> cell, including display objects other than strings.
> 
> Hope that helps!
> 
> |<
> 
> Karl Johnson
> Cynergy Systems, Inc.
> http://www.cynergysystems.com
> 
> -----Original Message-----
> From: [email protected]
[mailto:[EMAIL PROTECTED] On
> Behalf Of Ryan Pieszak
> Sent: Friday, April 14, 2006 9:32 AM
> To: [email protected]
> Subject: [flexcoders] Flex2 Beta2 - Looping through dataGrid to bold 
> cells
> 
> Hello all, if there's a better way to do this, please let me know.  
I'd
> prefer not to loop everytime the grid is refreshed.
> 
> So, if I'm trying to bold certain cells based on their value (by 
> looping), these are the problems I'm having...
> 
> 1) I can't find a property that holds the total row count of the
grid to
> use as the number to loop through.
> 
> 2) I thought this was the way to bold the text, but I can't get it
to
> work...
>    my_Grid.columns.my_Column[row_number].fontWeight="bold";
> 
> Thanks guys.
> Ryan
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links



 





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to