--- In [email protected], Fu Di <[EMAIL PROTECTED]> wrote:
>
> hi everyone,   i  wrote a  renderer  which  extends 
DataGridItemRenderer   in  DataGrid  
> some code below:
> 
> override public function getTextStyles():TextFormat
>         {
>             if (!listData||this.text=="") 
>             {
>                  return super.getTextStyles();
>             }
>     
>             if(listData.uid != lastUID)    
>             {
>                 var tf:TextFormat = super.getTextStyles();
>                 if(data is PositionDataBottomInfo)
>                 {
>                     tf.bold = true;
>                     
>                 }
>                 else
>                 {
>                     tf.bold = false;
>                 }
>             }
>             return tf;
>             
>         }
> 
> if  i  don't  operate  the DataGrid, every row's style is  
correct.  however , when  i scroll the DataGrid, the row's style is 
incorrect. 
> after scrolling  some rows turn bold, some turn  normal.   

There's a lightweight itemRenderer here that might point you in the 
right direction:

http://flexdiary.blogspot.com/2008/09/extended-datagrid-with-
stylefunction.html

HTH;

Amy

Reply via email to