I had a similar problem like this. Before the if statement where you are
checking if the value is not null, set this.text to "". This has worked for
me in the past so give it a shot.

Regards,

Troy

On 6/6/07, alom17959 <[EMAIL PROTECTED]> wrote:

Hi, Im Aldo, and i appreciate ur help guys !.

First of all, im using a conventional datagrid, the info comes from a
webservice, weborb of php, the problem appears only if i create an
item renderer component and use it, if dont, nothing happens,
everything looks good and pretty, scrolling doesnt affect anything,
but as soon as I write and compile something like this:

<mx:DataGridColumn headerText="Saldo" width="50" dataField="saldo"
itemRenderer="components.mostrador.atencionClientes.renderer_saldo"/>

when i scroll the screen goes bad. and like i said, if i dont use the
itemrenderer option, everything works fine.

So, i start to thinking that my itemrenderer was bad, and i checked
and double checked my code and seems to be fine.

Im sending part of my code, its really simple, and images of the
screen with the glitch... THank you , by the way, sorry for my
english, im from mexico, lol :P


LINKS: ============================================================
http://econtinua.cs.buap.mx/help/works_fine1.gif
http://econtinua.cs.buap.mx/help/works_fine2_at_bottom.gif
http://econtinua.cs.buap.mx/help/glitch.gif <======= ERROR

datagridCode: =====================================================

<mx:DataGrid width="512" height="352" x="174" y="10" id="grid"
doubleClickEnabled="true">
  <mx:columns>
      <mx:DataGridColumn headerText="#Folio" width="30"
dataField="id" paddingLeft="10" paddingRight="10" textAlign="right"/>
      <mx:DataGridColumn headerText="Servicio" width="50"
dataField="servicio"/>
      <mx:DataGridColumn headerText="Cliente" width="100"
dataField="cliente"/>
      <mx:DataGridColumn headerText="Status" width="40"
dataField="status"
textAlign="center"/>
      <mx:DataGridColumn headerText="Saldo" width="50"
dataField="saldo"
itemRenderer="components.mostrador.atencionClientes.renderer_saldo"/>
</mx:columns>
</mx:DataGrid>


Codigo del Renderer: ================================================

package components.mostrador.atencionClientes{

       import mx.controls.Label;
       import mx.formatters.CurrencyFormatter

   public class renderer_saldo extends Label
   {

       override public function set data(value:Object):void {
           super.data = value;
           if (value != null) {
                       this.text = value.saldo;
           }
         super.invalidateDisplayList();
       }
   }








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




Reply via email to