Image in a DataGrid

Hello, I want to introduce a image in one datagrid column but I don't know why. I'm trying doing that:
private var columns:ArrayCollection = new ArrayCollection([
                            {headerText: 'Image', dataField: 'column1', itemRenderer:'xxxxx', width: '5' },
private var date:ArrayCollection = new ArrayCollection([
               {column1:'../img/clip.png',
               {column1:'../img/clip2.png,}])
What I have to put in itemRenderer? Or I'm doing totaly wrong
It's better if I do
[Embed(source="img/clip.png")] public var buzonIcon:Class;
and then use buzenIcon in column1:.....
What is the solution?
Thanks!

Hi, Pls find the solution of the your problem.
MainApplication.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var dgArrayCollection:ArrayCollection=
new ArrayCollection([
{imgPath:'assets/img1.png', names:'John'},
{imgPath:'assets/img2.png', names:'Alex'},
{imgPath:'assets/img3.png', names:'Peter'},
{imgPath:'assets/img1.png', names:'Sam'},
{imgPath:'assets/img2.png', names:'Alis'},
{imgPath:'assets/img3.png', names:'Robin'},
{imgPath:'assets/img1.png', names:'Mark'},
{imgPath:'assets/img2.png', names:'Steave'},
{imgPath:'assets/img3.png', names:'Fill'},
{imgPath:'assets/img1.png', names:'Abraham'},
{imgPath:'assets/img2.png', names:'Hennery'},
{imgPath:'assets/img3.png', names:'Luis'},
{imgPath:'assets/img1.png', names:'Herry'},
{imgPath:'assets/img2.png', names:'Markus'},
{imgPath:'assets/img3.png', names:'Flip'},
{imgPath:'assets/img1.png', names:'John_1'},
{imgPath:'assets/img2.png', names:'Alex_1'},
{imgPath:'assets/img3.png', names:'Peter_1'},
{imgPath:'assets/img1.png', names:'Sam_1'},
{imgPath:'assets/img2.png', names:'Alis_1'},
{imgPath:'assets/img3.png', names:'Robin_1'},
]]>
</mx:Script>
<mx:VBox width="300" height="100%"
horizontalAlign="center"
verticalAlign="middle">
<mx:DataGrid id="dg" width="50%"
height="100%"
borderStyle="none"
dataProvider="{dgArrayCollection}"
>
<mx:columns>
<mx:DataGridColumn dataField="color" itemRenderer="DatagridItemRenderer"/>
<mx:DataGridColumn dataField="names" headerText="Names"/>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
</mx:Application>
DatagridItemRenderer.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
width="100" height="30" horizontalGap="5"
horizontalAlign="center"
horizontalScrollPolicy="off" verticalScrollPolicy="off"
>
<mx:Script>
<![CDATA[
override public function set data(value:Object):void
super.data = value;
]]>
</mx:Script>
<mx:Image width="75" height="30" source="{data.imgPath}"/>
</mx:HBox>
Let me know if you have any issue with this.
With Regards,
Shardul Singh Bartwal

Similar Messages

  • How do I show an image in a DataGrid column?

    I'm not sure that this is possible. I would like to show an
    image in a datagrid column based on the data that the grid is bound
    to. Is there any way to do this? I'm using Beta 3.
    Thanks!

    Yes, you need a custom itemRenderer. This can be inline or a
    custom class.
    Tracy

  • Help needed to add an image to a datagrid cell in actionscript

    Morning all,
    I am still quite new to flex development and I have an application which uses xml to populate a datagrid. One of the row columns should display a small image but I don't know how to do that.
    Can anyone show me how to add an image to a datagrid cell in actionscript?
    I've added a sample of the code I have written already below. Any help would be much appreciated.
    Thanks in advance,
    Xander
    My XM
    <?xml version="1.0" encoding="UTF-8"?>
    <dataset>
    <modules>
    <module id="1">
    <icon>assets/sample_image1.png</icon>
    <key>core</key>
    <name>Core</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 15:59 UK</installed>
    </module>
    <module id="2">
    <icon>assets/sample_image2.png</icon>
    <key>webproject</key>
    <name>Web Project</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 17:32 UK</installed>
    </module>
    </modules>
    </dataset>
    My Actionscript
    private function dataSetHandler(event:Event):void {
        var ds:XML = new XML(event.target.data);
        var rows:XMLList = ds.elements('modules').elements('module') as XMLList;
        var columns:Array = new Array();
        for (var i:int=0; i<rows[0].elements().length(); i++) {
            var column:DataGridColumn = new DataGridColumn();
            var tag:String = rows.*[i].name();
            column.headerText = rows.*[i].name();
            column.dataField = rows.*[i].name();
            if (tag == 'icon') {
                var img:Image = new Image();
                img.id = "iconpath";
                img.width = 23;
                img.height = 20;
                img.source = rows.*[i].name();
               column.itemRenderer = img;   <-- this line shows as an error when I try to compile
            columns[i] = column;
        mydatagrid.columns = columns;
        mydatagrid.dataProvider = rows;

    you cant just set image object to itemrenderer, you need to use classfactory.
    http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_4.html

  • Showing/hiding images in a DataGrid ItemRenderer flex

    Hi,
         I have datagrid in that i have a itemRenderer in which i am loading images. What i need to do is i have to hide one or two images in tha datagrid.
    For example if i have ten rows of data with image means i need to hode 4 rows images. Please any body help me.
    Regards,
    Jayagopal.
    Message was edited by: Jayagopal Flex

    Try adding visible='{data.participant_count>0}' to your HBox or Component
    -K

  • How to load images in FLEX datagrid using Actionscript

    Hello friends,
    I need a small help from you. i am working in flex and in flash builder 4. Now my requirement was, i want to display images inside datagrid. I found a solution in mxml when searching in net. But i need a solution in actionscript. Can anyone help me out. I am new to flex environment.
    i am attaching the mxml code along with this.
    your help will be appreciated.
    Rajesh
    <?xml version="1.0" encoding="utf-8"?>
    <!--
    Derrick Grigg
    [email protected]
    http://www.dgrigg.com
    created on Nov 3, 2006
    A sample of how to extend and use a data grid to allow custom drag images instead
    of the default 'row' based image.
    -->
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute">
        <mx:ArrayCollection id="dataSource">
            <mx:Object image="assets/ibmlogo.jpg" name="Spy Camera" description="James Bond spy camera"/>
            <mx:Object image="http://www.dgrigg.com/samples/flex/datagriddragproxy/images/products/cantena.jpg" name="Antena" description="Can shaped antena"/>
            <mx:Object image="http://www.dgrigg.com/samples/flex/datagriddragproxy/images/products/globe.jpg" name="Floating globe" description="Gravity defying floating globe"/>
            <mx:Object image="http://www.dgrigg.com/samples/flex/datagriddragproxy/images/products/orb.jpg" name="Orb" description="Blue glowing orb"/>
            <mx:Object image="http://www.dgrigg.com/samples/flex/datagriddragproxy/images/products/putty.jpg" name="Putty" description="Reshapable putty"/>
            <mx:Object image="http://www.dgrigg.com/samples/flex/datagriddragproxy/images/products/radiowatch.jpg" name="Radio Watch" description="Dick Tracy style radio watch"/>
            <mx:Object image="http://www.dgrigg.com/samples/flex/datagriddragproxy/images/products/rover.jpg" name="RC Rovers" description="Battle RC Rovers"/>
            <mx:Object image="http://www.dgrigg.com/samples/flex/datagriddragproxy/images/products/ufo.jpg" name="Flying UFO" description="RC UFO for indoor-outdoor"/>
        </mx:ArrayCollection>
        <mx:VBox>
            <mx:DataGrid dataProvider="{dataSource}">
                <mx:columns>
                    <mx:DataGridColumn headerText="Product" dataField="name"/>
                    <mx:DataGridColumn headerText="Description" dataField="description"/>
                    <mx:DataGridColumn headerText="Image" dataField="image">
                        <mx:itemRenderer>
                            <mx:Component>
                                <mx:Image source="{data.image}"/>
                            </mx:Component>
                        </mx:itemRenderer>
                    </mx:DataGridColumn>
                </mx:columns>
            </mx:DataGrid>
        </mx:VBox>
    </mx:Application>

    Hi Rajesh,
    The link worked for me ...May be that sight might have been blocked due to firewall in your ComputerSettings or so.
    May be you can try copy and paste the link in the browser instead of directly clicking the link.
    Make sure when you copy your link is not break I mean you shouldn't have any spaces in between url.
    Thanks,
    Bhasker

  • Need help adding image to datagrid column

    Hi,
    Can anyone tell me how to add an image to a datagrid column?
    I have created a flex library project which contains a mxml component with a datagrid, an item renderer mxml component which rendered the image within the datagrid column depending on the value coming back from the database for that column and a folder 'assets' which hold all the images. When I add the library to my main project and call the mxml component with the datagrid an image place holder is visible in the datagrid column but not the image. However, if I take the image out of the library project and added to an 'assets' folder in the main project the image is displayed in the datagrid column.
    It looks like, even though the images are in the flex library project and only the flex library project is trying to display the images in the datagrid, the library project is looking in the main application project folder for the image.
    Does anyone know why this is happening and how to fix it?
    Thanks in advance for an help,
    Xander.

    I have tried embedding the images in my library but it still didn't work. Also I can't embed the image as I'm using the value of the column to complete the image name, for example in my mxml item renderer component I have the added the following code
    <mx:Image source="@Embed(source='assets/' + data.mycolumnvalue + '.png')" tooltip="{data.mycolumnvalue}"/>
    but nothing is displayed.

  • DataGrid not rendering images during scrolling

    I've created a "Reusable Inline Item Renderer" to display an
    image in a DataGrid's column, as is shown here:
    http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/#reusable_item
    With one difference: In the example the source of the Image
    component in the item rendered is being set to the URL of an image
    file. In mine I am setting the source as a Bitmap object, the
    Bitmap being a public and Bindable property of an Object in an
    Array. This Array of Objects is the DataGrid's dataProvider.
    And it works fine, except that when I scroll the DataGrid,
    any images that have been scroll off screen and then back on again
    are blank where the image used to be. I've tried tracing out the
    source of each Image when it renders and it still has a Bitmap
    object as it's source even though it is no longer displaying
    it.

    I have been beating my head against the wall on this problem too for awhile now.  There is precious little mentioned anywhere about it.
    I tried to recreate your code, as follows, to solve my problem but now am getting compilation errors.
    Can you please share your code segment on how you did it?    (It would also be helpful to see how you call it too.)  I am loading images from the web with Loader.
    This does not compile:
            public function get data():BitmapData {
                return _data;
            public function set data(value:BitmapData):void {
                _data = value;
                 var newBitmap:Bitmap = new Bitmap(value);
                source = newBitmap;
    In my main class, the data provider is already populated, so I am replacing the cell with the bitmap.
    Thanks for any help you can give.

  • DataGrid with Image column rendering problem

    Hi,
    I'm having trouble in getting images displayed on a datagrid
    column. If I scroll down and then scroll up the scrollbar, the
    images are rendering fine. The source of the image is Bitmap which
    is generated at run time. Any idea how to solve this problem? Any
    help is greatly appreciated.
    Thanks,
    Jeesmon
    My component code is pasted below
    "Attach Code"
    <?xml version="1.0" encoding="utf-8"?>
    <mx:DataGrid xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()" dataProvider="{cardDataProvider}">
    <mx:Script>
    <![CDATA[
    import mx.core.UIComponent;
    import
    org.eclipse.higgins.cardselector.filters.CustomDropShadowFilter;
    import mx.collections.ArrayCollection;
    import mx.controls.Image;
    import org.eclipse.higgins.cardselector.icard.Card;
    [Bindable]
    private var cardDataProvider:ArrayCollection;
    private var _cards:Array;
    public function get cards():Object {
    return this._cards;
    public function set cards(value:Object):void {
    this._cards = value as Array;
    if(this._cards != null && this._cards.length > 0)
    buildDataProviderArray();
    private function buildDataProviderArray():void {
    var dataArray:ArrayCollection = new ArrayCollection();
    for(var i:int = 0; i<this._cards.length; i++) {
    var card:Card = this._cards
    dataArray.addItem(card);
    this.cardDataProvider = dataArray;
    private function init():void {
    this.styleName = "CardsBox";
    this.width = 200;
    this.rowHeight = 120;
    this.headerHeight = 0;
    this.liveScrolling = true;
    this.filters = [new CustomDropShadowFilter(0x333322, 55,
    2).getInstance()];
    ]]>
    </mx:Script>
    <mx:columns>
    <mx:DataGridColumn sortable="false" editable="false"
    resizable="false">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox width="100%" height="100%" paddingLeft="5"
    paddingRight="5" paddingTop="5" paddingBottom="0"
    verticalGap="0">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    private function getBitmap(value:*) : DisplayObject
    var result:DisplayObject;
    var loader:Loader = Loader(Image(value).getChildAt(0));
    if(loader.contentLoaderInfo.childAllowsParent)
    if(loader.content is Bitmap)
    var bitmap:Bitmap = Bitmap(loader.content);
    result = new
    Bitmap(bitmap.bitmapData,bitmap.pixelSnapping,bitmap.smoothing);
    return result;
    ]]>
    </mx:Script>
    <mx:Image source="{getBitmap(data.getImage())}"
    height="80" width="120" styleName="CardsBoxImage" />
    <mx:Label text="{data.getName()}"
    styleName="CardsBoxLabel" width="100%" />
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    </mx:columns>
    </mx:DataGrid>

    I solved the issue by adding creationComplete event handler
    for the image in the datagrid column
    <mx:Image source="{data.getImage()}" height="80"
    width="120" styleName="CardsBoxImage"
    creationComplete="event.target.source =
    getBitmap(event.target.source)" />

  • DataGrid itemRenderer, Loader & Image

    How is it possibe to render an image in a DataGrid when the
    image content has been loaded through the method loadBytes() from a
    Loader object ?

    Is this what you need?
    http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/
    Rgds
    JFB
    "C?driic" <[email protected]> wrote in
    message
    news:fcddcq$ruo$[email protected]..
    > How is it possibe to render an image in a DataGrid when
    the image content
    > has been loaded through the method loadBytes() from a
    Loader object ?

  • Display Image over Datagrid

    Hi,
    I need to display an image over the Datagrid exactly centered horizontally and vertically. The Datagrid can be of different height and width at different instances. Is there a way to achieve this?
    I used backgroundImage style property, however the image goes behind the datagrid content. I wish, there was a foregroundImage property which could have served my purpose.
    Please suggest.
    Thanks,
    Uma

    I would use a group and keep them seperate
    remember the z index is dependent in the order you create them in mxml

  • Apply Image to datagrid row

    hi
    i have one problem i need to apply image to selected row in
    datagrid dynamically we have
    "selectedcolor" but i need to apply image to selected row is
    there any way please help me
    client requires this effect
    karthik.k

    hi thanks for the reply i am posting sample code
    <DataGrid id="dg_getData1" backgroundColor="0x87A3B7"
    selectionColor="0xE4C38D" verticalScrollPolicy="off"
    horizontalScrollPolicy="off" itemClick="getIdForPresenter()"
    wordWrap="true" width="100%" verticalGridLines="false"
    backgroundAlpha="0.3" headerHeight="0" fontSize="20" rowHeight="53"
    dataProvider="{model.filteredCollection}" useRollOver="false"
    horizontalGridLineColor="0xFFFFFF" horizontalGridLines="true">
    <columns>
    <DataGridColumn width="30" dataField="sessionTimes" >
    <itemRenderer>
    <Component>
    <HBox horizontalScrollPolicy="off">
    <Script>
    <![CDATA[
    import mx.controls.Alert;
    override public function set data(value:Object):void
    var s_String1:String;
    var s_String2:String;
    var s_String3:String;
    var num:Number
    super.data=value;
    s_String1=sessionTimes.text;
    var arr_Array:Array=s_String1.split(" /");
    for(var i:int;i<arr_Array.length;i++)
    s_String3=arr_Array[0]
    sessionTime.text=s_String3
    s_String2=arr_Array[1];
    /* num=arr_Array[2]
    if(num%2==0)
    setStyle("backgroundColor",0x8EA9BB);
    else
    setStyle("backgroundColor",0x6B8FAB);
    if(s_String2=="NOT RECEIVED")
    sessionTime.styleName='textcolor';
    else
    sessionTime.styleName='textcolor1';
    ]]>
    </Script>
    <Label id="sessionTime" />
    <Text id="sessionTimes" text="{data.sessionTimes}"
    visible="false"/>
    </HBox>
    </Component></itemRenderer>
    </DataGridColumn>
    </DataGrid>
    i am using itemrenderer i need to place an image and when
    that row is clicked i need to display image for the row clicked and
    when next row clicked previously clicked image should disappear and
    currently clicked row should be displayed with image(every thing
    dynamically)
    only option i saw is "selectionColor="0xE4C38D" but i don't
    know how to place image instead of "selectionColor" for button we
    have style effect (upskin, downskin) where we can embed image but
    in datagrid any option like that,
    any idea this requirement is severe
    please help me
    karthik

  • How come the images are not getting displayed in ie?

    Hi,
    In my application i have a page where the thumbnails
    representing the videos uploaded into the site should be
    displayed.These imgaes are getting displayed in mozilla properly,
    but when it comes to ie 7 they are not getting displayed..instead
    iam getting a broken image.Please suggest me a solution.Thanks in
    advance.

    Hi KChamarti,
    I am also trying to display images insid the datagrid but i get a weird broken image(all silver gray).
    My item renderer is:
              <mx:DataGridColumn headerText="Type">
                   <mx:itemRenderer>
                     <mx:Component>
                      <mx:HBox verticalGap="2">
                          <mx:Image id="dgImage" source="\assets\images\{toLowerCase(data.type)}.jpg" />
                          <mx:Label text="{data.type}"/>
                        </mx:HBox>
                     </mx:Component>
                   </mx:itemRenderer>
                </mx:DataGridColumn>
    Am i mentioning the source of the image in the right way?

  • Image item renderer issue

    Hi all,
    Yesterday I found a soultion to display my image in my datagrid column. Now the issue is that if i leave the screen and come back to my screen the images move one space like the row index is adding one count, it's not validating my if statement.
    Any ideas?
    Thanks
    Johnny
    <mx:DataGridColumn headerText="LOCK" dataField="ISLOCKED" width="40">
        <mx:itemRenderer>
            <mx:Component>
                <mx:HBox horizontalAlign="center">
                <mx:Script>
                    <![CDATA[
                        import mx.core.BitmapAsset;
                        [Embed(source="assets/images/lock.png")]
                        [Bindable]
                        public var lockImage:Class;
                        private function checkLocked():void{
                            if (data.ISLOCKED == 1){
                                var asset:BitmapAsset = new lockImage() as BitmapAsset;
                                img.source = asset;
                                addChild(img);
                            }else{
                                img.source = "";
                                addChild(img);
                    ]]>
                </mx:Script>
                <mx:Image id="img" creationComplete="checkLocked()" />
                </mx:HBox>
            </mx:Component>
        </mx:itemRenderer>
    </mx:DataGridColumn>

    Renderers get recycled.  CreationComplete is rarely the event to use.  See
    the item renderers posts on my blog
    Alex Harui
    Flex SDK Team
    Adobe System, Inc.
    http://blogs.adobe.com/aharui

  • Datagrid using animated gif or flash

    I have a datagrid that is using an image control for its item
    renderer on one of the columns. That works just fine but I would
    like to be able to display an animated image in the datagrid
    instead of a static one.
    I know flex doesnt support animated gifs but is there any way
    I could make it show one in a data grid?
    Thanks.

    If you are web deployed you can put an animated gif as the image to an iconic button.
    Image items cannot display animated gifs.
    Anything else you can do through a JavaBean if you need to.

  • DataGrid, itemRenderer, viewStacks

    I am using an inline itemRenderer for an image on a Datagrid
    which rests in a viewStack. However, if the Datagrid is not in the
    first index of the viewStack the itemRenderer will not load. I've
    tried changing the creationPolicy of the viewStack with no avail.
    Any ideas?
    Thanks
    Ruben

    In the following code (modified version of yours) if you
    remove enabled="false" from the milestoneGrid datagrid it seems to
    work:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    height="200">
    <mx:ArrayCollection id="statusData">
    <mx:Object>
    <mx:itemLabel>M1</mx:itemLabel>
    <mx:schedDate>01/01/2008</mx:schedDate>
    <mx:startDate>01/01/2008</mx:startDate>
    <mx:endDate>01/10/2008</mx:endDate>
    <mx:user>Bob Smith</mx:user>
    <mx:status>overdue</mx:status>
    </mx:Object>
    <mx:Object>
    <mx:itemLabel>M2</mx:itemLabel>
    <mx:schedDate>01/01/2008</mx:schedDate>
    <mx:startDate>01/01/2008</mx:startDate>
    <mx:endDate>01/10/2008</mx:endDate>
    <mx:user>Bob Smith</mx:user>
    <mx:status>overdue</mx:status>
    </mx:Object>
    <mx:Object>
    <mx:itemLabel>M3</mx:itemLabel>
    <mx:schedDate>01/01/2008</mx:schedDate>
    <mx:startDate>01/01/2008</mx:startDate>
    <mx:endDate>01/10/2008</mx:endDate>
    <mx:user>Bob Smith</mx:user>
    <mx:status>overdue</mx:status>
    </mx:Object>
    <mx:Object>
    <mx:itemLabel>M4</mx:itemLabel>
    <mx:schedDate>01/01/2008</mx:schedDate>
    <mx:startDate>01/01/2008</mx:startDate>
    <mx:endDate>01/10/2008</mx:endDate>
    <mx:user>Bob Smith</mx:user>
    <mx:status>overdue</mx:status>
    </mx:Object>
    <mx:Object>
    <mx:itemLabel>M5</mx:itemLabel>
    <mx:schedDate>01/01/2008</mx:schedDate>
    <mx:startDate>01/01/2008</mx:startDate>
    <mx:endDate>01/10/2008</mx:endDate>
    <mx:user>Bob Smith</mx:user>
    <mx:status>overdue</mx:status>
    </mx:Object>
    <mx:Object>
    <mx:itemLabel>M6</mx:itemLabel>
    <mx:schedDate>01/01/2008</mx:schedDate>
    <mx:startDate>01/01/2008</mx:startDate>
    <mx:endDate>01/10/2008</mx:endDate>
    <mx:user>Bob Smith</mx:user>
    <mx:status>overdue</mx:status>
    </mx:Object>
    <mx:Object>
    <mx:itemLabel>M7</mx:itemLabel>
    <mx:schedDate>01/01/2008</mx:schedDate>
    <mx:startDate>01/01/2008</mx:startDate>
    <mx:endDate>01/10/2008</mx:endDate>
    <mx:user>Bob Smith</mx:user>
    <mx:status>overdue</mx:status>
    </mx:Object>
    <mx:Object>
    <mx:itemLabel>M8</mx:itemLabel>
    <mx:schedDate>01/01/2008</mx:schedDate>
    <mx:startDate>01/01/2008</mx:startDate>
    <mx:endDate>01/10/2008</mx:endDate>
    <mx:user>Bob Smith</mx:user>
    <mx:status>overdue</mx:status>
    </mx:Object>
    </mx:ArrayCollection>
    <mx:HBox borderStyle="solid">
    <mx:Button label="Datagrid One"
    click="gridVS.selectedChild=dg1;"/>
    <mx:Button label="Datagrid Two"
    click="gridVS.selectedChild=dg2;"/>
    </mx:HBox>
    <mx:ViewStack id="gridVS" width="100%" height="100%"
    creationPolicy="all">
    <mx:VBox id="dg1" width="100%" height="100%"
    verticalScrollPolicy="off" horizontalScrollPolicy="off">
    <mx:DataGrid id="milestoneGrid" height="100%"
    styleName="myDataGrid"
    width="100%" dataProvider="{statusData}" rowCount="8"
    variableRowHeight="true" enabled="false">
    <mx:columns>
    <mx:Array>
    <mx:DataGridColumn dataField="itemLabel"
    headerText="Milestone" width="120"/>
    <mx:DataGridColumn dataField="schedDate"
    headerText="Scheduled Start Date" width="120"/>
    <mx:DataGridColumn dataField="startDate"
    headerText="Started"/>
    <mx:DataGridColumn dataField="status"
    headerText="Status"/> <mx:DataGridColumn dataField="endDate"
    headerText="Completed"/>
    </mx:Array>
    </mx:columns>
    </mx:DataGrid>
    </mx:VBox>
    <mx:VBox id="dg2" width="100%" height="100%">
    <mx:DataGrid id="areaGrid" styleName="myDataGrid"
    width="100%" height="100%"
    selectable="true" rowCount="8" dataProvider="{statusData}"
    enabled="true"
    editable="false" variableRowHeight="true" >
    <mx:columns>
    <mx:Array>
    <mx:DataGridColumn dataField="itemLabel" headerText="Area"
    width="270" wordWrap="true"/>
    <mx:DataGridColumn dataField="startDate"
    headerText="Started"/>
    <mx:DataGridColumn dataField="endDate"
    headerText="Completed"/>
    <mx:DataGridColumn dataField="status"
    headerText="Status"/>
    <mx:DataGridColumn dataField="user" headerText="Run
    By"/>
    </mx:Array>
    </mx:columns>
    </mx:DataGrid>
    </mx:VBox>
    </mx:ViewStack>
    </mx:Application>

Maybe you are looking for