Use ActionScript to configure controls : ActionScript « Development « Flex






Use ActionScript to configure controls

Use ActionScript to configure controls
          
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
    
        private function myGrid_initialize():void {
          myGrid.dataProvider = [
            {Artist:'A', Album:'A1', Price:8.99},
            {Artist:'B', Album:'B1', Price:1.99},
            {Artist:'C', Album:'C1', Price:1.99},
            {Artist:'D', Album:'D1', Price:9.99} ];
        }
  
    </mx:Script>
    <mx:DataGrid id="myGrid" width="350" height="150" color="#7B0974" creationComplete="myGrid_initialize();"/>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Applying behaviors in ActionScript with Resize classApplying behaviors in ActionScript with Resize class
2.Set target and targets properties in ActionScriptSet target and targets properties in ActionScript
3.Add controls with ActionScriptAdd controls with ActionScript
4.Load swf file with ModuleManager in ActionScriptLoad swf file with ModuleManager in ActionScript
5.Inline ActionScriptInline ActionScript
6.Setting Triggers With ActionScriptSetting Triggers With ActionScript
7.Set Properties of a Child Defined in MXML in ActionScriptSet Properties of a Child Defined in MXML in ActionScript
8.Bind to Properties by Using ActionScriptBind to Properties by Using ActionScript
9.Specify an id value to refer to a component elsewhere in your MXML, either in another tag or in an ActionScript blockSpecify an id value to refer to a component elsewhere in your MXML, either in another tag or in an ActionScript block
10.Tags Are ClassesTags Are Classes
11.Attributes Are PropertiesAttributes Are Properties