Filter Criteria

Select Your Category Select a component

Datagrid with Implicit Array, ArrayCollection





Datagrid with ArrayCollection, automatic columns generation.

<mx:DataGrid x="10" y="53">
      <mx:ArrayCollection>
         <mx:Object>
            <mx:Artist>Pavement</mx:Artist>
            <mx:Price>11.99</mx:Price>
            <mx:Album>Slanted and Enchanted</mx:Album>
         </mx:Object>
         <mx:Object>
            <mx:Artist>Pavement</mx:Artist>
            <mx:Album>Brighten the Corners</mx:Album>
            <mx:Price>11.99</mx:Price>
         </mx:Object>
      </mx:ArrayCollection>
   </mx:DataGrid>
   
Datagrid with Customized ArrayCollection, automatic columns generation.

<mx:DataGrid x="10" y="250">
      <mx:ArrayCollection>
         <mx:Object Artist="Pavement"
            Album="Slanted and Enchanted" Price="11.99" />
         <mx:Object Artist="Pavement"
            Album="Brighten the Corners" Price="11.99" />
      </mx:ArrayCollection>
   </mx:DataGrid>

Datagrid with specified columns.

<mx:DataGrid>
      <mx:ArrayCollection>
         <mx:Object Artist="Pavement" Price="11.99"
            Album="Slanted and Enchanted" />
         <mx:Object Artist="Pavement"
            Album="Brighten the Corners" Price="11.99" />
      </mx:ArrayCollection>
      <mx:columns>
         <mx:DataGridColumn dataField="Album" />
         <mx:DataGridColumn dataField="Price" />
      </mx:columns>
   </mx:DataGrid>

   

Datagrid with Implicit Array with Specified columns.

<mx:DataGrid x="10" y="62" width="372" height="174">
<mx:columns>
                        <mx:DataGridColumn headerText="Country" dataField="label"/>
                                    <mx:DataGridColumn headerText="Code" dataField="shortCode"/>
                        </mx:columns>
                        <mx:dataProvider>
                                    <mx:Array>
                                    <mx:Object label="India" shortCode="Ind"/>      
                                    <mx:Object label="USA" shortCode="USA"/>     
                                    <mx:Object label="UK" shortCode="UK"/>         
                                    <mx:Object label="Japan" shortCode="Jap"/>    
                                    <mx:Object label="Spain" shortCode="SPN"/>   
                                    </mx:Array>     
                        </mx:dataProvider>
                       
            </mx:DataGrid>


No comments:

Post a Comment