Web Services
  Home arrow Web Services arrow Page 4 - Getting Started with Flex
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB SERVICES

Getting Started with Flex
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2008-06-10

    Table of Contents:
  • Getting Started with Flex
  • Developing a Flex Application
  • Flex in the Real World
  • DataGrid

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Getting Started with Flex - DataGrid


    (Page 4 of 4 )


    Next is the DataGrid control. It is useful when one needs to display tabular data.

    <?xml version="1.0" encoding="utf-8"?>

    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute">

    <mx:HTTPService id="httpRSS"
    url="http://apmuses.blogspot.com/feeds/posts/default"
    resultFormat="object"/>


    <mx:Panel id="reader" title="RSS Reader" width="776" height="100%">

    <mx:DataGrid id="entries"
    dataProvider="{httpRSS.lastResult.rss.channel.item}"
    width="100%">

    </mx:Panel>


    </mx:Application>

    The DataGrid has three main properties and dataProvider is the one that links it with the data source. Next comes the column. The column of DataGrid is an array.


    <?xml version="1.0" encoding="utf-8"?>

    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute">

    <mx:HTTPService id="httpRSS"
    url="http://apmuses.blogspot.com/feeds/posts/default"
    resultFormat="object"/>


    <mx:Panel id="reader" title="RSS Reader" width="776" height="100%">

    <mx:DataGrid id="entries"
    dataProvider="{httpRSS.lastResult.rss.channel.item}"
    width="100%">

    <mx:columns>

     

    <mx:Array>

     

    <mx:DataGridColumn headerText="Title"
    dataField="title"/>

    <mx:DataGridColumn headerText="Publish Date"
    dataField="pubDate"/>

    </mx:Array>

    </mx:columns>

    </mx:DataGrid>

    </mx:Panel>


    </mx:Application>


    The DataGridColumn has two main attributes. The headerText provides the header of the column and dataField provides the data for the column.

    That completes the application. When compiling it, the application will be converted to a flash file and embedded in an HTML file. When loading the HTML file, you will be able to see the RSS feeds from http://apmuses.blogspot.com/feeds/posts/default in a tabular format.

    That brings us to the end of this section as well as this discussion. This discussion has just shown you the tip of the iceberg regarding Flex. In a future discussion, each of the components and controls will be explained in detail. Till then…


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · excellent article, I was newbie to this technology, by going through the tutorial, I...
     

    WEB SERVICES ARTICLES

    - Safety, Idempotence, and the Resource-Orient...
    - The Resource-Oriented Architecture in Action
    - Features of the Resource-Oriented Architectu...
    - The Resource-Oriented Architecture
    - Getting Started with Flex
    - Automated Billing and Faxing for the Web
    - An Introduction to Web Services
    - The Foundations of Web Services: From Novice...
    - Web Services Reengineering: Finishing Touches
    - Fault Handling with Web Services
    - Flow and Web Services
    - Process Lifecycles and Web Services
    - Business Processes and Web Services
    - Orchestrating Web Services
    - Notifications and Resources in the WS-Resour...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek