OTT?
Please tell me about labelFunction.
 
Thanks
Husain

Allen Manning <[EMAIL PROTECTED]> wrote:
Custom cell renderer might be a bit OTT for this, labelFunction would be a
good start.

Best,
Allen



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Darron J. Schall
Sent: 14 October 2005 14:10
To: [email protected]
Subject: Re: [flexcoders] DataGridColumn display issue

Husain Kitabi wrote:

> I tried to use
> > headerText="Classgroup Venue" />
> > headerText="Classgroup Capacity"/>
> > headerText="Module"/>
>
>
> The first 2 columns are fine. But module.moduleName - it does not
> display anything. Has anybody done something like this. Pl advise.


You need to create a custom cell renderer. The default cell renderer
only allows you to go "1 deep" into an object, so you have to createa
cell renderer that can understand column names that use a path to get
deeper into a object.

Heres some partial code to give you an idea.. the entire cell renderer
will be found in Flex By Example with sample usage. This code would go
inside a "PathCellRenderer.as" file that creates a Label component to
render text.

private function setValue( str:String, item:Object, selection:String
):Void
{
if ( item == undefined ) {
label.visible = false;
return;
}

label.visible = true;

// Split up the complex path into pieces
var path = getDataLabel().split(".");
// "dot down" to the item to display
var toDisplay = item[ path[0] ];
for ( var i:Number = 1; i < path.length; i++ ) {
toDisplay = toDisplay[ path[i] ];
}

label.text = toDisplay;
}


Flex by example will ship on October 24th, I believe. :-)

-d




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








--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.14/131 - Release Date: 12/10/2005


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.14/131 - Release Date: 12/10/2005




------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->

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







hussain


Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

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