If you have the Flex 2.0 Beta, the architecture has changed completely from AS2. You can read about them in the "Developing Flex Applications" book, available here: http://labs.macromedia.com/wiki/index.php/Flex:Release_Notes#Beta_1_documentation
 
The chapters you want are "Using Cell Renderers and Cell Editors" at http://livedocs.macromedia.com/flex/20beta1/docs/00001063.html
 
 
Stephen


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Harald Dehn
Sent: Friday, March 03, 2006 10:20 AM
To: flexcoders@yahoogroups.com
Subject: AW: [flexcoders] Coustom cellRenderer in AS3 for a DataGrid

Hi

 

here ist the sourcecode I am experimenting with… Unfortunealy the setValue function (I found a lot of examples for flash 8) doesn’t work with AS3. Do have any idea?

 

Regards,

Harry

 

package CellRenderer {

      import mx.controls.Image;

      import mx.controls.Label;

      import mx.containers.HBox;

      import mx.core.IDataObject;

     

      public class KundeCellRenderer extends HBox {

            [Embed(source="Kunde.png")]

            public static const cKundeImage:Class;

            [Embed(source="Kunde_Del.png")]

            public static const cKundeDeleteImage:Class;

           

            private var _Icon:Image;

            private var _Label:Label;

            private var _DataObject:Object;

 

 

            public function setValue(str:String, item:Object, sel:Boolean):void {

                  _Label.text = item.KundenName;

            }

 

            protected override function createChildren():void {

                  super.createChildren();

                  this.setStyle("verticalAlign", "middle");

                  this.setStyle("marginLeft", 6);

                  _Icon = new Image();

                  _Icon.source = KundeCellRenderer.cKundeImage;

                  this.addChild(_Icon);

                  _Label = new Label();

                  // _Label.text = "1234";

                  this.addChild(_Label);

            }

 

            public function KundeCellRenderer() {

            }

      }

}

 


Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von jeremy lu
Gesendet: Freitag, 3. März 2006 16:09
An: flexcoders@yahoogroups.com
Betreff: Re: [flexcoders] Coustom cellRenderer in AS3 for a DataGrid

 

what you want to do with it ?

On 3/3/06, harald_dehn <[EMAIL PROTECTED]> wrote:

Hello,

does anyone know how to write a custom cellrenderer for a datagrid in
AS3. All examples i have found using MXML or were written for flash8
(using setValue function). Unfortunealy this approach doesn't work in
AS3...

Harry






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






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