0 Replies Latest reply on Mar 30, 2015 12:38 AM by senols25741270

    realtime HTTPService

    senols25741270

      Hi I want to upload data HTTPService 2 seconds once again .

       

      How can I change the css in a DataGrid .

      Hi I want to upload data HTTPService 2 seconds once again .

       

      How can I change the css in a DataGrid .

       

       

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

      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

        xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" creationComplete="init(event)" >

       

        <fx:Script>

        <![CDATA[

        import mx.collections.ArrayCollection;

        import mx.events.FlexEvent;

        import mx.rpc.events.ResultEvent;

       

        protected function init(event:FlexEvent):void{

        //Doviz.cancel();

        Doviz.send();

        }

        protected function Baglanti(event:ResultEvent):void{

       

        trace("Hello from Flex Debugging!");

        var jsonObj:Object = JSON.parse(event.result.toString());

        this.DovizList.dataProvider = new ArrayCollection(jsonObj as Array);

        //trace(jsonObj.title);

       

        }

       

       

       

       

       

        ]]>

        </fx:Script>

        <fx:Declarations>

        <s:HTTPService id="Doviz" url="http://www.xxx.com/x.php" method="GET" resultFormat="text" useProxy="false" result="Baglanti(event)"  requestTimeout="500"  />

        </fx:Declarations>

        <s:DataGrid id="DovizList" width="100%" height="100%">

        <s:columns>

        <s:ArrayList>

        <s:GridColumn headerText="Birim" dataField="title" />

        <s:GridColumn headerText="Alış" dataField="alis" />

        <s:GridColumn headerText="Satış" dataField="satis" />

        </s:ArrayList>

        </s:columns>

        </s:DataGrid>

      </s:View>