While it is not the ideal situation, as it still requires the use of
labelFunction, you can use a single function for all of the columns in
a DataGrid by using the headerText for each column to branch your
logic. I wish you could use something like the column's id attribute
but that is not a recognized property for some reason.

public function MyLabelFunction(item:Object, column:DataGridColumn):String
{
        switch(column.headerText)
        {
                case "Column 1":
                        return XML(item).ns::CreateDate[0].toString();
                        break;
                case "Column 2":
                        return XML(item).ns::DocumentType[0].toString();
                        break;
                default:
                        return "Unrecognized column";
        }
}






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/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/
 



Reply via email to