There will be a protected method that you can override to help you pick
the background color of the row.  But there isn't a row object that you
can style.

The method is currently not documented but will look something like
this:

protected function drawRowBackground(s:Sprite, rowBGIndex:int,
rowIndex:int, col:uint):void

Unfortunately this doesn't give you enough info to figure out the item
that is at that row I think.  So we'll need to look at this further.

Matt

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of breakneck79
Sent: Tuesday, March 14, 2006 3:51 AM
To: [email protected]
Subject: [flexcoders] style for any row on datagrid

Hi,
i want to define a style name that get from httpservice on xml format
to a row of datagrid,how i can do this?
thanks

xml code is :
<?xml version='1.0' encoding='utf-8'?>
<maillist>
<mail mailId='2'>
<style>sty1</style>
<subject>Fbszfgtnsry7 5  5e5 j5j kjujrfjdjyuju</subject>
<date>14 Mar 19:28:05</date>
<size>4 KB</size>
</mail>
<mail mailId='1'>
<style>sty2</style>
<subject>fvadfv</subject>
<date>14 Mar 12:11:01</date>
<size>3 KB</size>
</mail>
</maillist> 

and my mxml file in brif is :

<mx:HTTPService id="maillist" url="maillist.php" method="POST"
useProxy="false" result="do_maillist(event)"
fault="empty_maillist(event);">
        <mx:request xmlns="">
                <foldername>
                        {folderslist.selectedItem.name}
                </foldername>
        </mx:request>
</mx:HTTPService>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.*;
import mx.controls.Alert;
[Bindable]
public var folder:ArrayCollection;
public var list:ArrayCollection;
public var view:ArrayCollection;
public var mystyle:String;
                        
private function do_All():void
{maillist.send();}
                        
private function do_maillist(event:ResultEvent)
{
list=new ArrayCollection(maillist.result.maillist.mail);
maillister.dataProvider=list;
}
private function empty_maillist(event:FaultEvent)
{
Alert.show(event.fault.faultstring, "Error requesting data");
}
]]>
</mx:Script>
<mx:DataGrid  id="maillister" x="10" y="10" width="668" height="297"
marginBottom="0" marginLeft="0" marginRight="0" marginTop="0">
<mx:columns>
<mx:DataGridColumn headerText="Id" columnName="mailId" width="25"/>
<mx:DataGridColumn headerText="Subject" columnName="subject"
width="350" />
<mx:DataGridColumn headerText="Date" columnName="date" width="120"/>
<mx:DataGridColumn headerText="Size" columnName="size" width="120"/>
</mx:columns>
</mx:DataGrid>





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