DataGrid and getItemAt

Hi!
I used in my DataGrid this code:
<mx:itemRenderer>
<mx:Component>
<mx:VBox clipContent="false">
<mx:Text
text="{data.myid[data.myid.length()-1].toString())}"
paddingLeft="5" paddingRight="5" />
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
It works! BUT...I get Warning message: "
For Array, please use ArrayCollection.getItemAt() instead."
I tried to change my code:
<mx:Text
text="{data.myid.getItemAt(data.myid.length()-1).toString())}"
paddingLeft="5" paddingRight="5" />
It doesn't work! :(
I tried this:
<mx:Text
text="{data.dataProvider.myid.getItemAt(data.dataProvider.myid.length()-1).toString())}"
paddingLeft="5" paddingRight="5" />
It doesn't work too :(
Can you tell me how to use getItemAt in my example???
Marcin

Thanks for answer!
First, sorry! I hope that admin move it to Gen. Disc. forum.
My DataProvider is external XML. I thought that AS recognize
it as ArrayCollection. It looks like this:
// load
xmlFiletest.send();
// handle
public var XMLtest : XML;
XMLtest = XML(xmlFiletest.lastResult);
// in my DataGrid
dataProvider="{XMLtest}"
It's really huge XML (few MB's). I don't use addItem because
I don't need this.
Is it mean that this Warning - "For Array, please use
ArrayCollection.getItemAt() instead." is out of sense???
I can try convert it to ArrayCollection but I'm afraid that
can make my app much slower :(((
Do you have some suggestions?

Similar Messages

  • How to delete a selected row from datagrid and how to create a datagrid popup

    hi friends,
                  I am new to flex.i am doing a flex4 application,i need help for this.
                i am having a data grid with columns.i have two questions.
               Ques 1: when  i selected a partiuclar row from a datagrid and click delete button  means that record will delete from the datagrid and DTO from the cloud  tables also.
                Ques 2: when i save  the data grid values using save button means that data will store in  respective cloud DTO which is related to the datagrid,
                     My requirement is i am using a search button when i click the search  button it will show a datagrid that datagrid will contain the previous  datagrid datas which is saved in the cloud.
    REQUIREMENT example: first screen:           i am using with data grid 3 columns (Student Roll number ,Student Name,Student pecentage)---->save--->data will store in cloud DTO.
    Second screen:                search button ----> it need show  datagrid popup.it will have data which we saved in the first screen with same columns(Student Roll number ,Student Name,Student pecentage).
    This is my requirement.
    Any suggession welcome.
    Thanks in advance.
    B.Venkatesan

    Lets break the problem statement in multiple steps
    1. We need a way to know the selection on all rows.
    2. We need the association of the checkBox with the data
    The  solution is to use a arrayCollection/array that holds all the instances  created for checkbox.This collection should be a property of component  containing the datagrid. We need to use a custom component  implementation or inline ItemRenderer. The way you have used is called  dropinItemRenderer. Preferaly use custom component implementation and  add the instance to the arrayCollection at CreationComplete. Make sure  you use addItemAt so that you add the instance in the same row as the  data. To get rowIndex the custom Checkbox should implement  IDropInListItemRenderer. You could iterate this collection to check all  the instances that are checked.
    Note: This is the approach considering your dataprovider doesnt have a selection field.
    Nishant

  • How to delete a Selected row from datagrid and how to create a datagrid popup with saved values

    hi friends,
                  I am new to flex.i am doing a flex4 application,i need help for this.
                i am having a data grid with columns.i have two questions.
               Ques 1: when i selected a partiuclar row from a datagrid and click delete button means that record will delete from the datagrid and DTO from the cloud tables also.
                Ques 2: when i save the data grid values using save button means that data will store in respective cloud DTO which is related to the datagrid,
                    My requirement is i am using a search button when i click the search button it will show a datagrid that datagrid will contain the previous datagrid datas which is saved in the cloud.
    REQUIREMENT example: first screen: i am using with data grid 3 columns (Student Roll number ,Student Name,Student pecentage)---->save--->data will store in cloud DTO.
    Second screen: search button ----> it need show  datagrid popup.it will have data which we saved in the first screen with same columns(Student Roll number ,Student Name,Student pecentage).
    This is my requirement.
    Any suggession welcome.
    Thanks in advance.
    B.Venkatesan

    Lets break the problem statement in multiple steps
    1. We need a way to know the selection on all rows.
    2. We need the association of the checkBox with the data
    The  solution is to use a arrayCollection/array that holds all the instances  created for checkbox.This collection should be a property of component  containing the datagrid. We need to use a custom component  implementation or inline ItemRenderer. The way you have used is called  dropinItemRenderer. Preferaly use custom component implementation and  add the instance to the arrayCollection at CreationComplete. Make sure  you use addItemAt so that you add the instance in the same row as the  data. To get rowIndex the custom Checkbox should implement  IDropInListItemRenderer. You could iterate this collection to check all  the instances that are checked.
    Note: This is the approach considering your dataprovider doesnt have a selection field.
    Nishant

  • How2 load xml into datagrid, and create realtime search of datagrid data

    I wanted to be able to load xml data into a datagrid and then create a searchbox that would search in real time (as person typed) from any part of the datagrid.  Does anyone know of any as2.0 component that can do that easily?  If not, i would like to try to tackle this the old fashioned and use this to teach myself as2.0 advanced coding.  can someone point to a step by step or explain how i might get this accomplished?  from loading the xml to putting the node info into the datagrid, to being able to search it in real time.  This is part of a project that i was given that has some serious consequences if i botch it.  Please help!  Thanks so much!

    import fl.controls.DataGrid;
    import fl.controls.ScrollPolicy;
    import fl.data.DataProvider;
    import flash.net.URLLoader;
    import flash.events.Event;
    var dp:DataProvider = new DataProvider();
    var dg:DataGrid = new DataGrid();
    dg.columns=["User","Xp","Rank"];
    addChild(dg);
    var urlloader:URLLoader = new URLLoader();
    urlloader.addEventListener(Event.COMPLETE,loadcompleteF);
    urlloader.load(new URLRequest("whatever.xml"));
    function loadcompleteF(e:Event):void {
        var xml:XML=XML(e.target.data);
        for (var i:int = 0; i < xml..Name.length(); i++) {
            dp.addItem({User:xml..Name[i].User.text(), Xp:xml..Name[i].Xp.text(), Rank:xml..Name[i].Rank.text()});
        dg.dataProvider=dp;

  • GridView vs DataGrid and gateway

    Used to use DataGrids and in a template field Hyperlink, the portal converts the link to a fully gatewayed link... GridView Hyperlinkfield does not get "gateway converted"? Thoughts? Guess I could use a TemplateField, but was hoping to use a more default solution.
    EDIT: it appears that a template column with a hyperlink in a GridView does not get "gateway converted" either, hmmmm. Back to tesing and tinkering
    EDIT: I am a moron....have to set the gateway prefix in teh Web Service.....jsut shoot me now! TGIF!
    Edited by: mbowles on Nov 7, 2008 7:56 AM
    Edited by: mbowles on Nov 7, 2008 8:00 AM

    Doh..built my web app in VS2008 w/o using the app accel / AquaLogicWCLoader. It started out as a LINQ o/r mapping experiment - but am trying to take a step further and get into the portal. I'll tweak the web app (referenes to idk and wcloader, web forms into partial classes inheriting from BEA.ALI.Web.UI.ALIPortletPage) and see if that fixes. I'll keep the group posted.
    Bah-zing! It worked. As usual, thanks again, Joel!
    Edited by: tjannotta on Feb 17, 2009 9:37 AM

  • DataGrid and labelFunction

    Hi all!
    I have a DataGrid, and I have two columns where i want to manipulate the data shown. I tried using a labelfunction, but it turns out the labelfunction is called each time I focus out, and not only when the DataGrid is initialized.
    I've seen theres an initialize for DataGrid, but how can i use this to manipulate the data from my two columns?
    Sincerly

    How do you wrap an object?  It depends on how you are getting your data.  If
    you are using RemoteObject or can control the data type being sent over the
    wire, I would simply add a new getter to the data class.
    The most rudimentary way is something like this:  Say you had a ShoppingCart
    record:
    class ShoppingCartRecord
        public var catalogID:int;
    A wrapper class might look like:
    class DisplayableShoppingCartRecord
        public function DisplayableShoppingCartRecord(orig:ShoppingCartRecord)
            original = orig;
        public var original:ShippingCartRecord;
        public function get catalogID():int
            return original.catalogID;
        private var _displayName:String;
        public function get displayName():String
            if (!_displayName)
                _displayName = yourOldLabelFunction(orig);
            return _displayName;
    Then at some point, you loop through the original data set and instantiate
    the wrapped versions and pass that dataprovider to the datagrid.

  • Synchronization between datagrid and chart Item

    Hi
    In my application, I have a datagrid and corresponding bar
    chart. there is a toggle button through which I can switch between
    chart and data grid.
    Now I want to synchronize both.
    for example If I select any 3 rows in data grid then it
    should selects 3 bars on the chart also.
    can any body help me in that?
    Thanks
    smonika15

    Hi,
    U need to have a combo box renderer something like:
    In the object that u are populating the data provider of the
    data grid, add 2 fields:
    listOfFields & selectedField.
    <mx:HBox horizontalScrollPolicy="off"
    verticalScrollPolicy="off"
    xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    public var itemSelected: Object;
    ]]>
    </mx:Script>
    <mx:ComboBox id="combo"
    dataProvider="{data.listOfFields}"
    selectedItem="{data.selectedField}"
    change="itemSelected=combo.selectedItem;"
    updateComplete="itemSelected=combo.selectedItem;">
    </mx:ComboBox>
    </mx:HBox>
    Now, loop through the list of objects that u get from
    back-end and keep setting the 2 new properties (listOfFields &
    selectedField). For setting the value of selectedField, u need to
    loop through listOfFields to match the fieldId.
    Hope that helps,
    Cheree

  • Using same returned data to create datagrid and pie graph

    I am trying to find a good example or information on creating
    charts, initially pie graphs. I will be getting the data from a
    MySQL DB via a HTTPService call to a PHP script. I would like to
    use the same HTTPService call to make a datagrid and build a pie
    graph. My datagrid is working fine.
    All of the examples I have found show the app with an
    internal data source that's hard coded into an array (
    http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDo cs_Parts&file=00001234.html).
    I did search this forum, but it seems most people are just looking
    for dynamic pie graphs and there isn't enough in the entries for me
    to go off of.
    The data returned to the MXML app looks like this:
    <auditdata>
    <riskdata>
    <core>core number here</core>
    <subcore>subcore number here</subcore>
    <mdata>mdata here</mdata>
    <risk1>number here</risk1>
    <risk2>number here</risk2>
    <risk3>number here</risk3>
    </riskdata>
    <riskdata>
    <core>core number here</core>
    <subcore>subcore number here</subcore>
    <mdata>mdata here</mdata>
    <risk1>number here</risk1>
    <risk2>number here</risk2>
    <risk3>number here</risk3>
    </riskdata>
    </auditdata>
    When the data is returned, everything under <riskdata>
    is put into a datagrid. What I'm looking to do in the pie graph is
    this.
    Create a 2 different pie graphs for each riskdata (there will
    only be 2). The first pie graph will be of the three "risks" (where
    their total number equals 100% of the graph). The second pie graph
    would be "core - subcore" and risk1 (where the two values total
    equals 100%of the graph). I hope that makes sense.
    Any guidance would be truly appreciated.
    Thanks,
    Chris

    Does anyone have any ideas on this?
    Thanks,
    Chris

  • Help with xmlListCollection and getItemAt method!

    All,
      I have a simple application in which I have a data grid, http sevice and xmllistcollection. I get the xml data and populate the xmllistcollection. Objective is to traverse the xmlcollection to get the first row, parse and set the column headers dynamically.
    the first row in the xmllistcollection are the column headers. I am trying to get the values using the getItemAt(0) method, which does return a object but not sure how to traverse the object to draw the column headers for the data grid dynamically? below is the sample example
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
      <![CDATA[
       import mx.collections.ArrayCollection;
       import mx.rpc.events.ResultEvent;
       import mx.rpc.events.FaultEvent;
       import mx.controls.Alert;
       import mx.controls.dataGridClasses.DataGridColumn;
              public function fetch():void
          xmlRPC.send();        
          var i:int = 0;     
          var a:XMLList = new XMLList(xdata.getItemAt(0).toString() as XMLList); 
         Alert.show(a.text() + "a");
         for each(var xml:XML in a)
           Alert.show("I am inside" + i);
           var attributes:XMLList = xml.attributes();
           var o:Object = new Object();
           for each (var attribute:XML in attributes)
            Alert.show("I am  way inside" + i);
            var nodeName:String = attribute.name().toString();
            var value:*;
            Alert.show(attribute.toString());
            value = attribute.toString();
               i = i+1;   
      ]]>
    </mx:Script>
        <mx:HTTPService result="handleXMLnew(event);" fault="handleFault(event);" id="xmlRPC" resultFormat="e4x"
        url="http://abc/Xcelsius/swat/RCD.xsql" useProxy="false">
    </mx:HTTPService>
    <mx:XMLListCollection id="xdata" source="{xmlRPC.lastResult.ROW}"/>
    <mx:DataGrid dataProvider="{xdata}" x="24" y="110" id="adg1" width="694" height="168"/>
    <mx:Button x="653" y="44" label="Go" click="fetch();"/>
    </mx:Application>

    try this, to  parse and set the column headers dynamically.
    http://flexpearls.blogspot.com/2008/02/generating-dg-columns-for-xml-data.html
    Hope this will work.

  • Datagrid and Inline Item renderer problem

    I have a datgrid with two inline item renderers. The dataprovider for my DG is a nested object (objects within objects within objects i.e 3-layered).
    Main Object - 1st Level
                              |
                  2nd Level Object 1
                                    |
                                3rd level object '1' => ('name'=>somename,'id'=>someid)
                                3rd level object '2'
                                3rd level object 'n'
                 2nd Level Object 2
                                    |
                                3rd level object '1' => ('name'=>somename,'id'=>someid)
                                3rd level object '2'
                                3rd level object 'n'
    I use 2 item renderers (one for each datagrid column) which loops thro the 2nd level object1 and 2 respectively (the 2nd level object is a dynamic array of objects, in that the number of objects within keep changing).
    Within the item renderer I loop thro the 2nd level object using a foreach and then display the data. The data is a linkbutton, which when clicked , calls a remote object function to delete the data from the database
    now on the result event of the remote object function call, i call the function to repopulate the DG, so that the updated data is displayed.
    When i click on the linkbutton in the first row, the backend works perfectly fine (the data gets deleted from the database and the refreshed data is sent back), but for some reason, the deleted data suddenly appears in the 2nd row.
    When i delete it from the second row, it appears on the 3rd row (nothing happens in the backend since the data is already deleted).. and so on, till it appears on the last row and then the DG looks exactly the way it shld have looked after the first delete.
    This is just the beginning. The second item renderer also displays a linkbutton, which when clicked, displays that data in the previous column (the one where this data can be deleted). When i click on 1st row, the data gets added in the previous column of the second row .. and so on..
    Basically, my DG is acting really weird. I overrided the set data function in the item renderer to refrsh the data and called its invalidateDisplayList. I also call the Datagrid's invalidateDisplayList function after each refresh.  The behavior remains the same.
    Please help me on this ...

    Hi, Post a test code.... It will be a lot easier to help you Mich

  • Datagrid and multiple ItemRenderer

    What I would like to do and haven't been successful is add a column to a Datagrid at runtime.  Each cell in that column is going to be different based upon user data. The first column is populated based upon a user query then another query (i.e. RESTful query) is made to mashup some data.
    I wanted a button (mashup data) to appear in the column enabled if data was available and disabled if data was not available.
    I was doing something like this:
    My MXML file has this:
            <mx:DataGrid id="dg" dataProvider="{ModelLocator.getInstance().list}" itemClick="itemClickHandler(event)" left="10" right="0" bottom="0" top="50" editable="true" >
                <mx:columns>
                    <mx:DataGridColumn headerText="Name" dataField="name" editable="true" />
                     <mx:DataGridColumn headerText="Data" dataField="someData" itemRenderer="ActionButtonItemRenderer" />
                </mx:columns>
            </mx:DataGrid>
    ActionButtonItemRenderer.as file:
        public class ActionButtonItemRenderer extends Button
            public function ActionButtonItemRenderer()
                super();
                label = "Show Data";
            override public function set data(value:Object):void {
                if (null == value.myData) {
                    label = "";
                    this.enabled = false;
            // Handle the search button event.
            override protected function clickHandler(event:MouseEvent):void
                // Code omitted here...
    It works but when I use my mouse wheel to scroll through the records the buttons get all hosed up and the enabled buttons become disabled.  It's weird.
    Thanks!

    You create an ArrayCollection or XMLListCollection and populate it initially with perhaps data that would represent "no data".
    Then if your queries return real data, the dataProvider object now "has data".
    The itemRenderer does the appropriate thing if there is not is no data.
    You don't generate the button in the dataProvider, you just get the label and visible property value etc. from the dataProvider.
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services

  • Datagrid and scientific value problem...

    why does the values coming from a database into a datagrid
    shows in a scientific notation and how could it be resolved?
    Immediate Response Required...
    Thanks in Advance.

    why does the values coming from a database into a datagrid
    shows in a scientific notation and how could it be resolved?
    Immediate Response Required...
    Thanks in Advance.

  • 2 way databinding between DataGrid and DropDownList

    I am not getting anywhere with what I thought is the most simplest basic thing in the world.
    I have a ArrayCollection "employees" which is used to fill a DataGrid. The department is listed as an Integer value. I would like to display however the name of the department, which is in a second ArrayCollection "departmentsArray". So the itemRenderer (which is not yet implemented in this code) needs to match the "idn" value with the "departmentid" value and then display the name of the department. However, when the user clicks on the DropDownLists and selects a new department, the departmentid value in the employee array needs to get updated too.
    I am assuming that this can be done with 2 way databinding, but I am not getting this to work and would greatly appreciate if someone could show me how the code would have to look for this.
    Michael
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
         <fx:Declarations>
              <!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
         </fx:Declarations>
         <fx:Script>
              <![CDATA[               
                   import mx.collections.ArrayCollection;
                   [Bindable]
                   private var employees:ArrayCollection = new ArrayCollection([
                        {idn:1, firstname:'Lisa', lastname:'Tran', departmentid:1},
                        {idn:2, firstname:'Michael', lastname:'Orchard', departmentid:2},
                        {idn:3, firstname:'Wolfgang', lastname:'Prettyer', departmentid:2},
                        {idn:4, firstname:'Julia', lastname:'Stancau', departmentid:3},
                   [Bindable]
                   private var departmentsArray:ArrayCollection = new ArrayCollection([
                        {idn:1, department:'Video'},
                        {idn:2, department:'Web'},
                        {idn:3, department:'Print'},
              ]]>
         </fx:Script>
         <s:DataGrid x="57" y="90" width="410" requestedRowCount="4" dataProvider="{employees}">
              <s:columns>
                   <s:ArrayList>
                        <s:GridColumn dataField="idn" headerText="ID"></s:GridColumn>
                        <s:GridColumn dataField="firstname" headerText="Vorname"></s:GridColumn>
                        <s:GridColumn dataField="lastname" headerText="Nachname"></s:GridColumn>
                        <s:GridColumn dataField="departmentid" headerText="Department"></s:GridColumn>
                   </s:ArrayList>
              </s:columns>
         </s:DataGrid>
    </s:Application>

    Thanks for the info.
    I've only seen info about Snow Leopard syncing (and it doesn't really specify 2 way) to Exchange (which is not LDAP)
    Addressbookserver (www.addressbookserver.com) is also not LDAP.
    I really need this to work (2 way sync) with an LDAP server.
    Thanks.

  • When to use the DataGrid (and not the AdvancedDataGrid)

    Hi All,
    I've got a new project I'm working on and I've just been using the plain ol' DataGrid to display a grid of data.  But I understand that with Flex 3 they introduced the "AdvancedDataGrid" which is, erm, more advanced.  Hence the name.
    Is there any reason why I might want to continue using the DataGrid?  Or should I convert my existing DataGrid to an AdvancedDataGrid?  I think that it should be a pretty easy conversion, just change a few tag names.
      -Josh

    The AdvancedDataGrid has more overhead than the DataGrid. If your application is sensitive to slowdown, you'd want to stick with the DataGrid unless you specifically need the features of the ADG (multi-column sorting, grouping, cell styles, etc.)
    The notable exception is, in my experience, using the ADG's styleFunction callback is faster than applying an ItemRenderer to the datagrid. So if you need to style individual cells, the ADG is the way to go even if you don't need the additional functions.

  • DataGrid and XML with only 1 entry

    Hi All,
    I have a datagrid set up that is displaying an xml file.
    Seems to work fine until there is only 1 entry in my xml file, then
    I get no content displayed in the datagrid.
    Here is my code that I am using for my app,
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" initialize="xmlDat.send()">
    <mx:Script>
    <![CDATA[
    import mx.controls.dataGridClasses.DataGridColumn;
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var myData:ArrayCollection;
    private function resultHandler(event:ResultEvent):void{
    myData = event.result.projects.project;
    ]]>
    </mx:Script>
    <mx:HTTPService id="xmlDat" url="data/whiteboard.xml"
    result="resultHandler(event)"/>
    <mx:Panel layout="absolute" title="Project Whiteboard"
    height="600" width="1000" verticalCenter="-1"
    horizontalCenter="-1">
    <mx:DataGrid dataProvider="{myData}" width="980"
    height="560" y="0" x="0" verticalScrollPolicy="on"
    variableRowHeight="true" editable="false">
    <mx:columns>
    <mx:DataGridColumn headerText="Due Date"
    dataField="dueDate" width="85"/>
    <mx:DataGridColumn headerText="DVD ID" dataField="dvdId"
    width="65"/>
    <mx:DataGridColumn headerText="School Name"
    dataField="schoolName" width="275"/>
    <mx:DataGridColumn headerText="City" dataField="city"
    width="100"/>
    <mx:DataGridColumn headerText="St" dataField="state"
    width="35"/>
    <mx:DataGridColumn headerText="Qty" dataField="quantity"
    width="45"/>
    <mx:DataGridColumn headerText="Image Prep"
    dataField="imagePrep" itemRenderer="render.imgRender"/>
    <mx:DataGridColumn headerText="Video Prep"
    dataField="videpPrep" itemRenderer="render.vidRender"/>
    <mx:DataGridColumn headerText="Sequencing"
    dataField="sequencing" itemRenderer="render.seqRender"/>
    <mx:DataGridColumn headerText="FTP" dataField="ftp"
    itemRenderer="render.ftpRender"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Panel>
    </mx:Application>

    quote:
    Originally posted by:
    peterent
    When there is only 1 entry in the result you don't have an
    Array any more, you have a scalar. That's because the Player
    doesn't know you intend or want to always have an Array.
    Look up ArrayUtils and the toArray function. That should
    help.
    This sounds like just what I need. The only problem I am
    having now is how to implement it into my code. When I add it to
    the code it works for when I have one entry but if it is more than
    that then no data shows.
    Anyone have some ideas on this? Here is my updated code that
    works for one entry in the xml but not more than that.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="initApp()">
    <mx:Script>
    <![CDATA[
    import mx.controls.dataGridClasses.DataGridColumn;
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    import mx.utils.ArrayUtil;
    [Bindable]private var myData:ArrayCollection;
    private var uintPollInterval:uint = 10000;
    private var timer:Timer = new Timer(uintPollInterval);
    private function initApp():void
    xmlDat.send();
    timer.addEventListener(TimerEvent.TIMER, onTimer);
    timer.start();
    private function onTimer(event:TimerEvent):void
    xmlDat.send();
    timer.start();
    ]]>
    </mx:Script>
    <mx:HTTPService id="xmlDat" url="data/whiteboard.xml"
    result="resultHandler(event)"/>
    <mx:Panel layout="vertical" title="Project Whiteboard"
    height="100%" width="1000" verticalCenter="-1"
    horizontalCenter="-1">
    <mx:DataGrid
    dataProvider="{ArrayUtil.toArray(xmlDat.lastResult.projects.project)}"
    width="980" height="100%" y="0" x="0" verticalScrollPolicy="on"
    variableRowHeight="true" editable="false">
    <mx:columns>
    <mx:DataGridColumn headerText="Due Date"
    dataField="dueDate" width="85"/>
    <mx:DataGridColumn headerText="DVD ID" dataField="dvdId"
    width="65"/>
    <mx:DataGridColumn headerText="School Name"
    dataField="schoolName" width="275"/>
    <mx:DataGridColumn headerText="City" dataField="city"
    width="100"/>
    <mx:DataGridColumn headerText="St" dataField="state"
    width="35"/>
    <mx:DataGridColumn headerText="Qty" dataField="quantity"
    width="45"/>
    <mx:DataGridColumn headerText="Image Prep"
    dataField="imagePrep" itemRenderer="render.imgRender"/>
    <mx:DataGridColumn headerText="Video Prep"
    dataField="videpPrep" itemRenderer="render.vidRender"/>
    <mx:DataGridColumn headerText="Sequencing"
    dataField="sequencing" itemRenderer="render.seqRender"/>
    <mx:DataGridColumn headerText="FTP" dataField="ftp"
    itemRenderer="render.ftpRender"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:ControlBar horizontalAlign="right">
    <mx:Button label="Update" click="xmlDat.send()"/>
    </mx:ControlBar>
    </mx:Panel>
    </mx:Application>

Maybe you are looking for

  • Is there a way to select all layers at once?

    I have a bunch of layers, WITHOUT holding down control and clicking each one, one by one, is there a button or shortcut to just auto highlight all the layers, Im trying to move them around evenly together on the canvase at once. Thanks

  • Problem with Microsoft Word

    I've had my Macbook for over a year and never had this problem: When I try to open a Word document from my Downloads, Microsoft can't open the file. It starts to run, but freezes and won't open anything. Any ideas?

  • How do I find and delete phantom email messages?

    The icon says I have five new messages (up from one a few weeks ago), but I can't find them in any of the folders (I have looked on both phone and computer). I have also changed my settings to erase deleted messages in 24 hours, but the phantom messa

  • How to merge iOS messages conversation feeds?

    My wife and I have been texting back and forth for a long time now on the same conversation feed using iMessage (we both have iPhones) and just recently, after updating to iOS 8, both our phones randomly created a completely new conversation feed for

  • 10g OEM Alerts

    Hi, How Can i Find out the alerts which are already set in 10g OEM. Also please help me on how to add new alerts through OEM. Thanks, Chandra