Problem with datagrid dataprovider

I'm wondering why is it my search result is null after I press search button. After I press search, the datagrid is blank. But I ever test my service and it's working.
Anyone has any idea how to solve it? So sorry I'm totally new to FLEX... >.<
Below is my code...
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                       xmlns:s="library://ns.adobe.com/flex/spark"
                       xmlns:mx="library://ns.adobe.com/flex/mx"
                       xmlns:productbasicservice="services.productbasicservice.*"
                       width="1024" height="768">
    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
            import mx.controls.TextInput;
            import mx.events.DataGridEvent;
            import mx.events.FlexEvent;
            import mx.rpc.AsyncToken;
            import valueObjects.Product_basic;
            protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
                getProduct_basic_pagedResult.token = productbasicService.getProduct_basic_paged();
            protected function saveClick(event:MouseEvent):void
                productbasicService.commit();
            protected function revertData(event:MouseEvent):void
                productbasicService.revertChanges();
            protected function searchData(event:MouseEvent):void
                var searchStr:String = searchbox.toString();
                searchProduct_basicResult.token = productbasicService.searchProduct_basic(searchStr);
                dataGrid.dataProvider = searchProduct_basicResult.lastResult;
        ]]>
    </fx:Script>
    <fx:Declarations>
        <s:CallResponder id="getAllProduct_basicResult"/>
        <productbasicservice:ProductbasicService id="productbasicService"
                                                 fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
                                                 showBusyCursor="true"/>
        <s:CallResponder id="getProduct_basic_pagedResult"/>
        <s:CallResponder id="searchProduct_basicResult"/>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <mx:DataGrid id="dataGrid" x="11" y="61" width="1003" height="557"
                 creationComplete="dataGrid_creationCompleteHandler(event)"
                 dataProvider="{getProduct_basic_pagedResult.lastResult as ArrayCollection}" editable="true">
        <mx:columns>
            <mx:DataGridColumn width="200" dataField="id" editable="false" headerText="ID"/>
            <mx:DataGridColumn dataField="name" headerText="name"/>
            <mx:DataGridColumn width="200" dataField="price" headerText="Price"/>
            <mx:DataGridColumn dataField="description" headerText="description"/>
        </mx:columns>
    </mx:DataGrid>
    <s:Button x="849" y="22" label="Save" click="saveClick(event)"/>
    <s:Button x="944" y="22" label="Revert" click="revertData(event)"/>
    <s:TextInput x="14" y="22" width="367" id="searchbox"/>
    <s:Button id="button" x="389" y="22" label="Search" click="searchData(event)"/>
</s:WindowedApplication>
I have added my own data service operation in the php file called searchProduct_basic(searchStr). Basically this function return the object of the search result.

It's the same for lastResult as ArrayCollection.
            protected function searchData(event:MouseEvent):void
                var searchStr:String = searchbox.toString();
                searchProduct_basicResult.token = productbasicService.searchProduct_basic(searchStr);
                dataGrid.dataProvider = searchProduct_basicResult.lastResult;
For you information, the searchProduct_basic(searchStr) would return Product_basic object. >.<

Similar Messages

  • Problem with datagrid horizontal scrollbar

    Hi all,
    I am facing problem with Datagrid HorizontalScrollBar.
    As per requirement i need to seperate the Horizontal and verticalscroll bars from grid.
    So what i did was, i created HScroll & VScroll components and associated them Datagrid scroll bars. I made HorizontalScrollPolicy and VerticalScrollPolicy "off" for datagrid.
    As i binded values to HScroll & VScroll components which are out side of datagrid, i should be able to scroll datagrid using those components.
    Its working fine for VScroll. When i scroll VScroll component am able to scroll datagrid vertically.
    Problem is with HorizontalScrollPolicy in datagrid, when i change the policy to "on" i can see the scrollbar down to datagrid and able to scroll.  once i change the policy to "off", datagrid columns are getting resized and datagrid width will set back to its container width without scrollbar, because of this there will be no HorizontalBar for datagrid to assiciate with HSCroll Component.
    Code given below:
    [AS]
    private function vScrollGrid(event:ScrollEvent):void
      mainTable.verticalScrollPosition=vScrollBar.scrollPosition;
    private function hScrollGrid(event:ScrollEvent):void
      mainTable.horizontalScrollPosition=hScrollBar.scrollPosition;
    }[/AS]
    [CODE]
    <mx:HBox height="100%" verticalScrollPolicy="off"  horizontalScrollPolicy="off">
            <mx:DataGrid dataProvider="{reportData}"
                 id="mainTable"   
                 height="100%"
                 width="100%"
                 textAlign="right" allowMultipleSelection="true" visible="false" verticalScrollPolicy="off" horizontalScrollPolicy="off"/>
            <mx:VScrollBar id="vScrollBar" height="100%" pageSize="1" scrollPosition="{mainTable.verticalScrollPosition}" maxScrollPosition="{mainTable.maxVerticalScrollPosition}" scroll="vScrollGrid(event)"/>
    </mx:HBox>
    <mx:HScrollBar id="hScrollBar" height="100%" pageSize="1" scrollPosition="{mainTable.horizontalScrollPosition}" maxScrollPosition="{mainTable.maxHorizontalScrollPosition}" scroll="hScrollGrid(event)"/>
    [/CODE]
    Please help me to resolve this
    Thanks & Regards
    Pratap

    1. Try calling setEnabled(true); on the scrollbar
    2. Check that you need to scroll. If efffectively the knob (as the API docs call it) is larger than the scrollbar, it probably won't be shown.

  • Problems with DataGrid

    I'm in trouble here with DataGrid, i have an implementation
    where a public bindable property of a custom component is used
    binded as the dataProvider for a Datagrid inside this component,
    but, when i change this property and then tell my ViewStack to jump
    over to that component, the DataGrid sometimes doesn't get
    refreshed with the right data. I tested if the dataProvider is
    right and it is, and when i just push (meaning .push(item:*)) an
    item in the list, the DataGrid shows correctly. problem is, i must
    show data without having to push an item, so i work-arounded it
    with a timer implementation that pushes and deletes an empty value,
    what's by the way terrible.
    I went to JIRA trying to see what's been made on this, but
    all related bugs are told to be historical and shows no information
    at all.
    Am i doing something wrong? or it's a bug no one talks
    about?

    "tech_holic" <[email protected]> wrote in
    message
    news:gq8lok$jdh$[email protected]..
    > I'm in trouble here with DataGrid, i have an
    implementation where a public
    > bindable property of a custom component is used binded
    as the dataProvider
    > for
    > a Datagrid inside this component, but, when i change
    this property and
    > then
    > tell my ViewStack to jump over to that component, the
    DataGrid sometimes
    > doesn't get refreshed with the right data. I tested if
    the dataProvider is
    > right and it is, and when i just push (meaning
    .push(item:*)) an item in
    > the
    > list, the DataGrid shows correctly. problem is, i must
    show data without
    > having
    > to push an item, so i work-arounded it with a timer
    implementation that
    > pushes
    > and deletes an empty value, what's by the way terrible.
    > I went to JIRA trying to see what's been made on this,
    but all related
    > bugs
    > are told to be historical and shows no information at
    all.
    > Am i doing something wrong? or it's a bug no one talks
    about?
    If you use .push into the internal Array of an
    ArrayCollection, then it's
    not going to generate any of the events that ArrayCollection
    uses if you use
    its official API (addItem/removeItem).
    I suspect that what you're doing is replacing the
    ArrayCollection when you
    populate it rather than just adding or removing.
    HTH;
    Amy

  • Problems with DataGrid and WordWrap

    Hi all,
    I have some problem with the headerText property of the
    mx:DataGridColumn, when the text is longer than the column width.
    Even if I set headerWordWrap property to true, sometimes the text
    shown in the header is truncated.
    The behaviour is strange: if you change the column width
    moving the mouse, sometimes the text is truncated and other times
    it isn't.
    Can somebody help me or confirm that it is a Flex bug, please
    thanks
    cheers,
    ennio

    Had you installed Flex 2 Hotfix 1? This fix fixes many bugs
    when columns are resized.

  • Problems with DataGird.dataProvider

    Ok, first; Sorry that my English isn't very well, but see I'm
    just 13 years old boy from The Netherlands. Hope you still want to
    help me guys :)
    Im busy with a site with a: DateChooser, Search form and
    DataGird. Ive made Active Server Pages and used some states and a
    lot of Functions() and <Mx:httpService>.
    I want that the DataChooser let see some posttitles in my
    DataGird, and the same for the Search form. But, when i use this
    function's:
    quote:
    private function calclicked(evta:Event)
    myGird.dataProvider == "evta.lastResult.items.item"
    private function searchclicked(evtb:Event)
    myGird.dataProvider == "evtb.lastResult.items.item"
    And this Mx:httpService:
    quote:
    <mx:HTTPService id="calclick" result="calclicked(event)"
    showBusyCursor="true" method="POST" url="
    http://localhost/GameBasedScripts/cal.asp"
    useProxy="false" > <!-- resultFormat="object" -->
    <mx:request xmlns="">
    <selecteddate>{lblneed.text}</selecteddate>
    </mx:request>
    </mx:HTTPService>
    <mx:HTTPService id="searchpost"
    result="searchclicked(event)" showBusyCursor="true" method="POST"
    url="
    http://localhost/GameBasedScripts/search.asp"
    useProxy="false" > <!-- resultFormat="object" -->
    <mx:request xmlns="">
    <tags>{txtSearch.text}</tags>
    </mx:request>
    </mx:HTTPService>
    It shows just 'evta.lastResult.items.item' or
    'evta.lastResult.items.item' in my DataGird, and not the Data of
    that. Anyone?

    quote:
    Originally posted by:
    Saskovic
    First remove the quotes from:
    myGird.dataProvider == "evta.lastResult.items.item"
    This, since you inserting a string into the dataprovider this
    way.
    (Don't you get an error message for this?)
    And if your not using the clicked methods for anything else,
    you could attach the lastresult directly in the mxml datagrid
    component. (I'm not sure how anymore, since I rather do my requests
    from actionscript (instead of using mxml) (URLRequest, databinding,
    etc.))
    Thanks for response :)
    It's working now, but there where alot of more problems,
    One of them:
    quote:
    [Bindable]
    public var:myData:Object
    and put in my DataGird.DataProvider
    {myData}

  • Problem with DataGrid/AdvancedDataGrid using variableRowHeight

    I need a column with more that an information for example(title and description of a movie in the same cel)
    and for that I created a custorm renderer to hold the information togeter. Following the code for the renderer..
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%"
                  verticalScrollPolicy="off" horizontalScrollPolicy="off"
                  paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0">
           <mx:HBox horizontalGap="0">
                 <mx:Label text="Title:"/>
                 <mx:Label text="{data.title}"/>
           </mx:HBox>
           <mx:HBox horizontalGap="0" paddingLeft="3" paddingRight="3">
                 <mx:Label id="descLbl" text="Description:"/>
                 <mx:Text text="{data.description}" width="{width-6-descLbl.width}"/>
           </mx:HBox>
    </mx:VBox>
    Because I don't need something special when the data is get or set I didn't override that functions.
    Since the Text control need explicit width to wordWrap the text I binded that value to the available space instead of use "100%".
    Of course not all the descriptions has the same length and the description could take 1, 2, 3 or more rows so I set the valiableRowHeight of the grid to "true".
    When load everything works, mistakes comes when you try to enlarge the column to make a description to take less row (example row #1 before sesizig the description need 3 rows of text and after the resizing the descriotion need only 2 rows) as soon as you resized the column you notice that the text of the description effectly refreshed and takes only 2 rows but the height of the row could countain the 3rd row of the description that no more exists.
    If you do another resize operation the row height refresh correctly (example click on the column separator)
    I also tried to do table.validateNow(); on the mouse up event of the table.
    Following the code of a simple application.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100%" height="100%">
           <mx:Script>
                 <![CDATA[                 
                        import mx.collections.ArrayCollection;
                        import mx.controls.Alert;
                        import mx.core.UIComponent;
                        import mx.events.FlexEvent;
                        [Bindable]
                        public var dp:ArrayCollection = new ArrayCollection([
                               {title:"Ghost Rider: Spirito di vendetta", description:"Johnny Blaze, funambolo del motociclista " +
                                                                                                                             "trasformato in spirito della vendetta dal " +
                                                                                                                             "demonio in virtù di un patto firmato con il " +
                                                                                                                             "sangue per la salvezza del padre, vive " +
                                                                                                                             "ritirato, rifiuta il proprio status e la " +
                                                                                                                             "propria missione. A richiamarlo in attività " +
                                                                                                                             "è la Chiesa, in Romania infatti il diavolo " +
                                                                                                                             "si è palesato di nuovo per sguinzagliare " +
                                                                                                                             "nuovi sgherri alla ricerca di un bambino " +
                                                                                                                             "a cui tiene in maniera preoccupante."},
                               {title:"La furia dei titani", description:"Gli uomini non pregano più, se ne sono " +
                                                                                                                             "disamorati dei loro dei, e come conseguenza " +
                                                                                                                             "questi stanno a poco a poco perdendo i " +
                                                                                                                             "propri poteri, compresa quell'immortalità " +
                                                                                                                             "che li rende sempre giovani. Alcuni sono " +
                                                                                                                             "anche morti. Intimoriti da quel che sta " +
                                                                                                                             "accadendo alcuni superstiti pianificano " +
                                                                                                                             "di riportare in vita Chronos dal Tartaro, " +
                                                                                                                             "spodestare Zeus e spazzare via il mondo. " +
                                                                                                                             "Per evitare il disastro viene richiamato " +
                                                                                                                             "in battaglia Perseo, che dopo aver sconfitto " +
                                                                                                                             "il mitologico Kraken si è ritirato a vita " +
                                                                                                                             "da pescatore. Sarà però costretto a rimettere " +
                                                                                                                             "mano alla spada dopo essere venuto a sapere " +
                                                                                                                             "dal morente zio Poseidone che il padre degli " +
                                                                                                                             "dei (nonchè suo) è stato catturato."},
                               {title:"Paranormal Xperience 3D", description:"Un gruppo di studenti di psichiatria accetta la " +
                                                                                                                "proposta del professore più autoritario della " +
                                                                                                                "facoltà: andranno in un villaggio minerario " +
                                                                                                                "abbandonato dove sarà loro possibile verificare " +
                                                                                                                "se i fenomeni paranormali esistono veramente. " +
                                                                                                                "Per il viaggio utilizzano un pulmino che viene " +
                                                                                                                "fornito loro da Diana, sorella della studentessa " +
                                                                                                                "Angela, che si unisce al gruppo. Sarà proprio il " +
                                                                                                                "passato infantile delle due sorelle ad entrare " +
                                                                                                                "drammaticamente nell'indagine."}
                        protected function table_mouseUpHandler(event:MouseEvent):void
                               table.validateNow();
                 ]]>
           </mx:Script>
           <mx:VBox horizontalScrollPolicy="off" verticalScrollPolicy="off"
                         width="500" height="500"
                         horizontalGap="0">
                 <mx:DataGrid id="table"    width="500" height="500"
                                                    dataProvider="{dp}" variableRowHeight="true" mouseUp="table_mouseUpHandler(event)">
                        <mx:columns>
                               <mx:DataGridColumn id="titleCol" dataField="title" headerText="Title" wordWrap="true"/>
                               <mx:DataGridColumn id="titDescCol" itemRenderer="CustomRenderer" wordWrap="true"/>
                        </mx:columns>
                 </mx:DataGrid>
           </mx:VBox>
    </mx:Application>
    The descriptions are in italian but for a simple example the langage of the text  doesn't matter
    Hope can you help me guys otherwise I will be creazy very soon trying to solve this problem.

    Does your parent clip have any styles associated with it?
    Something is overwriting the Arial font.
    Try _lockroot if that persists.

  • Problem with DataGrid DataSource

    Hello,
    I am having problems to populate my advanced datagrid. Though
    the grid is getting headers, it is not getting the data from my
    datasource (Please note that I am using a cfc functions called
    "getOrds" to retrieve the data.
    Am I missing something in the code??
    It would be great if someone could help me out with this one.
    <?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.IHierarchicalCollectionView;
    [Bindable]
    [Bindable]
    public var ords:ArrayCollection = new ArrayCollection;
    public function getOrds(event:ResultEvent):void
    ords = event.result as ArrayCollection;
    ]]>
    </mx:Script>
    <mx:AdvancedDataGrid id="adg" x="28" y="64" width="609"
    height="228" creationComplete="gc2.refresh();"
    initialize="gc2.refresh();" designViewDataType="tree"
    defaultLeafIcon="{null}" folderClosedIcon="{null}"
    folderOpenIcon="{null}" >
    <mx:dataProvider>
    <mx:GroupingCollection id="gc2" source="{ords}" >
    <mx:Grouping>
    <mx:GroupingField name="rule_no" >
    <mx:summaries>
    <mx:SummaryRow summaryPlacement="group">
    <mx:fields>
    <mx:SummaryField dataField="rule_no" operation="SUM" />
    </mx:fields>
    </mx:SummaryRow>
    </mx:summaries>
    </mx:GroupingField>
    <mx:GroupingField name="cakes">
    <mx:summaries>
    <mx:SummaryRow summaryPlacement="group" >
    <mx:fields>
    <mx:SummaryField dataField="cakes" operation="COUNT" />
    </mx:fields>
    </mx:SummaryRow>
    </mx:summaries>
    </mx:GroupingField>
    </mx:Grouping>
    </mx:GroupingCollection>
    </mx:dataProvider>
    <mx:groupedColumns>
    <mx:AdvancedDataGridColumn headerText="rule_no" />
    <mx:AdvancedDataGridColumn headerText="Cakes"
    dataField="cakes"/>
    </mx:groupedColumns>
    </mx:AdvancedDataGrid>
    <mx:RemoteObject id="myService" destination="ColdFusion"
    source="components.AdvancedDG" showBusyCursor="true"
    fault="Alert.show(event.fault.message,'Error')">
    <mx:method name="getOrds" result="getOrs(event)"/>
    </mx:RemoteObject>
    </mx:Application>

    Please see following changes:
    <mx:ViewStack id="menuOptions" width="100%" paddingBottom="5" height="100%">
          <mx:Panel width="100%" height="100%" layout="absolute" id="panel1" label="Panel 1" title="Panel 1" titleIcon="@Embed(source='resources/panel_icon.png')">
                <mx:DataGrid id="grid1" width="100%" height="100%"/>
          </mx:Panel>
          <mx:Panel width="100%" height="100%" layout="absolute" id="panel2" label="Panel 2" title="Panel 2" titleIcon="@Embed(source='resources/panel_icon.png')">
                <mx:DataGrid id="grid2" width="100%" height="100%" />
          </mx:Panel>
          <mx:Panel width="100%" height="100%" layout="absolute" id="panel3" label="Panel 3" title="Panel 3" titleIcon="@Embed(source='resources/panel_icon.png')">
                <mx:DataGrid id="grid3" width="100%" height="100%"/>
          </mx:Panel>
    </mx:ViewStack>

  • Problem with Datagrid itemrenderer with a Datagrid

    Hi all,
    I have this kind of a structure. I try to use a datagrid item renderer in a data grid column. However when I try to move rows inside the same datagrid I experience a problem. When my datagrid loads first it seems correct, but when I drag and drop a row in the same datagrid inner datagrids start to be drew in wrong rows. I checked the DB but there are no mistakes in DB records. Problem is with rendering. I suppose inner datagrids trying to draw to early or datagrid component is trying to reuse the itemrenderer. I could not find any solutions for that. Any help will be greatly appreciated..
    <mx:DataGridColumn width="130" editable="false"
              headerText="{resourceManager.getString('resources', 'acl.content')}">
              <mx:itemRenderer>
                   <mx:Component>
                        <ACLInnerDataGrid rowCount="3"     dragEnabled="true"     dropEnabled="false"
                        x="0" y="0"     editable="true" dragInitiatorId="catGrid"
                        filterGroupName="content" remoteDestination="zend"
                        remoteSource="ACLFilterParamService" showHeaders="false"
                        creationComplete="this.init();">
                             <columns>
                                  <mx:DataGridColumn dataField="id" editable="false" visible="false"/>
                                  <mx:DataGridColumn dataField="ruleId" editable="false" visible="false"/>
                                  <mx:DataGridColumn dataField="filterKey" editable="false" visible="false"/>
                                  <mx:DataGridColumn dataField="param" editable="false" visible="false"/>
                                  <mx:DataGridColumn dataField="name" editable="true"/>
                             </columns>     
                        </ACLInnerDataGrid>
                   </mx:Component>
              </mx:itemRenderer>
    </mx:DataGridColumn>
    Thanks in advance.

    I have attached the item renderer component source code.

  • Problems with datagrid from FXP, I did something, but I got problems with mysql...

    Good night My name is Michel.
    Right!, I have a challenge to myself. that is to relearn flash builder, I have a few years without touching it or anything.
    But I still have the ease of get these new things added.
    Going straight to the point, as I am Brazilian, some things from the file will be in Portuguese, I hope you can help me! I appreciate it. Well, I'm creating a Datagrid, this Datagrid was done in FXP, and imported into the FB, I did some workarounds and got where I wanted, only that there are problems.
    the scheme is this:
    MySQL database = NoticiasService
    Connected by Zend / PHP.
    Everything right until here.
    I have the file main.mxml> DatalistSinspebNoticias.mxml> DatalistSinspebNoticiasRepeatedItemSkin.mxml - just here.
    I will not make a closed file (FXP), because my file is just a mess and only I understand the way it was organized.
    The problem is:
    The datagrid is infinite, I want to limit it to eight items repeated.
    The link does not work with "TextConverter" to "HTML"
    FB lives showing me glitches.
    then I will initiate an implementation of other applications, such as adding data to the DB, and Update DB. Thanks Folks!
    Main.mxml ------------------------------------------------------------------------->
    <?xml version='1.0' encoding='UTF-8'?>
    <s:Application xmlns:ATE="http://ns.adobe.com/ate/2009"
                                     xmlns:ai="http://ns.adobe.com/ai/2009"
                                     xmlns:fc="http://ns.adobe.com/flashcatalyst/2009"
                                     xmlns:d="http://ns.adobe.com/fxg/2008/dt"
                                     xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:lib="assets.graphics.caixa_feed_sinspeb.*"
                                     xmlns:flm="http://ns.adobe.com/flame/2008"
                                     xmlns:noticiasservice="services.noticiasservice.*"
                                     width="100%" height="100%" backgroundColor="#FFFFFF" preloaderChromeColor="#FFFFFF"
                                     fc:previewHeight="380" fc:previewWidth="430">
              <fx:Style source="Main.css"/>
              <fx:Script>
                        <![CDATA[
                                  import mx.events.FlexEvent;
                                  protected function list1_creationCompleteHandler(event:FlexEvent):void
                                            getAllNoticiasResult.token = noticiasService.getAllNoticias();
                        ]]>
              </fx:Script>
              <fx:Declarations>
                        <s:CallResponder id="getAllNoticiasResult"/>
                        <noticiasservice:NoticiasService id="noticiasService" showBusyCursor="true"/>
              </fx:Declarations>
              <fx:DesignLayer d:id="2" d:userLabel="Layer 1">
                        <s:List id="list1" x="10" y="8"
                                            creationComplete="list1_creationCompleteHandler(event)"
                                            skinClass="components.DataListSinspebNoticias" labelField="conteudo_nt">
                                  <s:AsyncListView list="{getAllNoticiasResult.lastResult}"/>
                        </s:List>
              </fx:DesignLayer>
    </s:Application>
    ------------------------------------------------------------------------->
    DatalistSinspebNoticias.mxml ------------------------------------------------------------------------->
    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:d="http://ns.adobe.com/fxg/2008/dt"
                        xmlns:flm="http://ns.adobe.com/flame/2008"
                        xmlns:ai="http://ns.adobe.com/ai/2009"
                        width="407" height="374">
              <fx:Metadata>[HostComponent("spark.components.List")]</fx:Metadata>
              <s:states>
                        <s:State name="normal"/>
                        <s:State name="disabled"/>
              </s:states>
              <s:DataGroup id="dataGroup" x="0" y="0" width="407" height="353" clipAndEnableScrolling="true"
                                             itemRenderer="components.DataListSinspebNoticiasRepeatedItemSkin"
                                             height.normal="374" buttonMode.normal="true">
                        <s:layout>
                                  <s:VerticalLayout gap="1"/>
                        </s:layout>
              </s:DataGroup>
    </s:Skin>
    ------------------------------------------------------------------------->
    DatalistSinspebNoticiasRepeatedItemSkin.mxml ------------------------------------------------------------------------->
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:s="library://ns.adobe.com/flex/spark"
                                            xmlns:fx="http://ns.adobe.com/mxml/2009"
                                            xmlns:d="http://ns.adobe.com/fxg/2008/dt"
                                            xmlns:flm="http://ns.adobe.com/flame/2008"
                                            xmlns:ai="http://ns.adobe.com/ai/2009"
                                            width="402" height="39" autoDrawBackground="false">
              <fx:Script>
                        <![CDATA[
                                  import flashx.textLayout.conversion.ConversionType;
                                  import flashx.textLayout.conversion.TextConverter;
                        ]]>
              </fx:Script>
              <s:states>
                        <s:State name="normal"/>
                        <s:State name="hovered"/>
                        <s:State name="selected"/>
              </s:states>
              <s:Rect x="5" y="3" width="78" height="32">
                        <s:fill>
                                  <s:SolidColor color="#01557C"/>
                        </s:fill>
                        <s:stroke.hovered>
                                  <s:SolidColorStroke caps="none" color="#96F2FF" joints="miter" miterLimit="4" weight="2"/>
                        </s:stroke.hovered>
              </s:Rect>
              <s:Rect d:id="3" x="85.5" y="0.5" width="315" height="37" flm:variant="1"
                                  x.hovered="86" y.hovered="1">
                        <s:fill>
                                  <s:LinearGradient x="157.5" y="0" scaleX="32" rotation="90">
                                            <s:GradientEntry ratio="0" color="#FFFFFF"/>
                                            <s:GradientEntry ratio="0.488676" color="#E0EEF9"/>
                                            <s:GradientEntry ratio="1" color="#D6E9F7"/>
                                  </s:LinearGradient>
                        </s:fill>
                        <s:stroke>
                                  <s:SolidColorStroke caps="none" color="#666666" joints="miter" miterLimit="4" weight="1"
                                                                                    color.hovered="#999999" weight.hovered="2"
                                                                                    color.selected="#0065FF"/>
                        </s:stroke>
              </s:Rect>
              <s:Rect d:userLabel="Item Highlight Rectangle" x="5" y="0" width="396" height="33" alpha="0">
                        <s:fill>
                                  <s:SolidColor color="0xCED7EE"/>
                        </s:fill>
              </s:Rect>
              <s:RichText  x="20" y="12" width="48" height="14" ai:aa="2"
                                            color="#FFFFFF" columnCount="1" fontFamily="Myriad Pro" fontSize="14" kerning="on"
                                            tabStops="S0" text="{data.datada_nt}" flm:variant="2" whiteSpaceCollapse="preserve"/>
              <s:RichText x="89.95" y="8" width="309" height="24" ai:aa="2" color="#000000" columnCount="1"
                                            fontFamily="Arial Narrow" fontSize="11" kerning="on"
                                            tabStops="S0 S50 S100 S150 S200 S250 S300"
                                            textFlow="{TextConverter.importToFlow(data.conteudo_nt, TextConverter.TEXT_FIELD_HTML_FORMAT)}"
                                            trackingRight="16%"
                                            flm:variant="3" whiteSpaceCollapse="preserve"
                                            buttonMode.normal="false" lineThrough.normal="false">
                        <s:filters>
                                  <s:GlowFilter alpha="1.0" blurX="0" blurY="0" color="#000000" inner="false"
                                                                  knockout="false" quality="2" strength="1"/>
                        </s:filters>
              </s:RichText>
              <s:Path includeIn="hovered" x="0.35" y="12.35" data="M 12.40 7.15 L 0.03 14.29 0.03 0.01 Z ">
                        <s:stroke>
                                  <s:SolidColorStroke caps="none" color="#666666" joints="miter" miterLimit="4" weight="1"/>
                        </s:stroke>
                        <s:fill>
                                  <s:LinearGradient rotation="90">
                                            <s:GradientEntry color="#FFFFFF" ratio="0"/>
                                            <s:GradientEntry color="#E0EEF9" ratio="0.488676"/>
                                            <s:GradientEntry color="#D6E9F7" ratio="1"/>
                                  </s:LinearGradient>
                        </s:fill>
              </s:Path>
    </s:ItemRenderer>
    ------------------------------------------------------------------------->

    The following says how to restore from backup.
    iOS: How to back up
    If you go to iTunes>Preferences>Devices you can see if you have an iTunes backup. You need one dated before or the exact time you started the restore.

  • Columnar alignment problem with DataGrid

    Hi All.
    I've got the following DataGrid:
    http://www.joshbeall.com/personal/flex/grid1.png
    If you filter out some of the results with zeros in the
    referred/applied columns, this is what you get:
    http://www.joshbeall.com/personal/flex/grid2.png
    See how the column heads aren't aligned with the columns?
    Interestingly enough, I don't always get this behavior, but it
    happens often. If I click a column head (to change the sort order),
    the alignment is corrected.
    I've attached the complete MXML for this application.
    BTW, another problem I had (and have given up trying to hunt
    down is), why do I need to declare my WebService as
    <mx:WebService>, instead of just doing it entirely in code?
    You can see in my MXML that I have commented out a few lines of AS
    initializing the WebService instance. Originally, I was declaring
    and using my WebService entirely in code. However, the databinding
    wasn't working -- the grid never populated. When I changed it to be
    declared as an <mx:WebService> tag, everything started
    working.
    -Josh

    Josh,
    Which version of the Flex 3 SDK are you using? There were a
    few DataGrid issues similar to this which have been fixed since the
    public Labs beta 1 drop. If you download the latest nightly SDK
    build (
    http://labs.adobe.com/technologies/flex/sdk/flex3sdk.html)
    and install that into Flex Builder are you still seeing the
    DataGrid issue?
    Peter

  • Problem with datagrid

    Hi,
    I am doing an application i dont know how to get the data
    from combobox to datagrid. Let us take i have some data like
    arrived and not arrived in my combo box and in datagrid i have one
    column. If i select arrived in my combobox it should be displayed
    in my datagrid. Can any one tell any sample example.Any code.
    Muthu

    Hi,
    You might have to listen to change event of the ComboBox and
    then change the property of the objects in the dataprovider which
    corresponds to the column you want to modify.
    I created a very simple sample. Please find the code
    attached.
    Hope this helps.

  • 100% scaling problem with datagrid

    I have a situation where I have an AdvancedDataGrid in an hbox . I have a checkbox called scrollTable that changes the width of the AdvancedDataGrid
    <mx:HBox height="100%" id="gridWrap" width="100%" >
    <mx:AdvancedDataGrid
    if(scrollTable.selected){
                            deals.width = 2200;
                        }else{
                            deals.percentWidth = 100;
                        gridWrap.validateSize();
    Everything is contained in a panel with a fixed width set by the user. The behaviour I want is for just the hbox to have scroll bars when the AdvancedDataGrid  is given a size of 2200 , not the outer containing panel to get scrollbars and the hbox expanding inside the panel. I suspect that the problem is because the hbox has 100%, which is what I need because the user can resize the panel.
    Hope someone can help
    thanks

    The quickest solution is to:
    1) Change the model variable to:
    public var _xlcDg:XMLListCollection
    1) set resultFormat="e4x" on the HTTPService instance
    2) in the handler, do:
    var xmlResult:XML = XML(event.result);
    trace(xmlResult.toXMLString()); //to see what you have
    var xlPersons:XMLList = xmlResult.person; //you can use the
    XMLlist directly, but it is not best practice
    trace(xlPersons.length); //what you expect?
    _xlcDg = new XMLListCollection(xlPersons);
    If you want an ArrayCollection, create a class to be your
    value object, then loop through the XMLList and create a new
    instance of the VO, assign the propderty values form the xml node,
    then addItem() to put it in the array collection.
    Tracy

  • Strange Problem with datagrid item renderer in flash palyer 10

    Hi All
    In Flash player 10 when i use a text input as a item renderer in grid with a custom textinput skin , it does not show us the text , where as in flash player 11 it shows us. is there any work around for it or it's a bug.
    Plz help  me on this.

    The url works for me.  Please verify that you entered it correctly.  There are other sites that will verify your player version.  Search for them, pick one and report the results.
    Before you file a bug, it is probably best to do some investigation first to make sure it isn’t a known issue or an issue in your code.

  • Fade effect with DataGrid. Header text are visible ... :(

    Hi,
    the problem with DataGrid.
    If I specify the Fade effect for showing DataGrid, all lines
    are showing correct, so the fade works, but the headers text and
    the data texts are showing immediately (like without Fade).
    Is it possible to avoid this effect? I want to show my
    datagrid from alpha 0.00 to 1.00 for ALL elements (for lines, for
    headers, for headers TEXT and of course of data TEXT)
    Is it a bug?

    I had the same problem. I havent fixed it but I did a work
    around and used a WipeDown effect in parallel. It eliminates the
    headers of appearing immediately.

  • Problem with checkbox item renderer in datagrid

    I have a data grid having check box as an item renderer. I have viewed many posts in this forum but nothing useful in my case. I am failed to bind my datagrid itemrenderer checkbox with the field of dataprovider i.e. listUnitMovement.CHECK_PATH. Then I have to traverse data provider to check which checkboxes are checked.
    [Bindable]
    var listUnitMovement:XMLList=null;                      
    In a function call
    public function init(event:ResultEvent):void
        listUnitMovement=event.result.unitmovement;
         <mx:DataGrid id="dg_country"
                               dataProvider="{listUnitMovement}"
                                  enabled="true">
                                <mx:columns>
                                   <mx:DataGridColumn>
                                        <mx:itemRenderer>
                                            <mx:Component>
                                                <mx:CheckBox selectedField="CHECK_PATH"  />
                                            </mx:Component>                                       
                                        </mx:itemRenderer>
                                    </mx:DataGridColumn>
                                    <mx:DataGridColumn headerText="Latitude" dataField="NEW_LAT" visible="false"/>
                                    <mx:DataGridColumn headerText="Longitude" dataField="NEW_LONG" visible="false"/>
                                   <mx:DataGridColumn>
                                        <mx:itemRenderer>
                                            <mx:Component>
                                                <mx:Button label="Details"/>
                                            </mx:Component>                                       
                                        </mx:itemRenderer>
                                    </mx:DataGridColumn>
                                </mx:columns>
                            </mx:DataGrid>

    Hi,
    Do you want to just check/uncheck the checkboxes based on the CHECK_PATH field.
    Do you want something like this...
    <?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;[
    Bindable] 
    private var listUnitMovement:ArrayCollection = new ArrayCollection([{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:false,NEW_LAT:133.233,NEW_LONG:702.22}]);]]>
    </mx:Script>
     <mx:DataGrid dataProvider="{listUnitMovement}">
     <mx:columns>
     <mx:DataGridColumn>
     <mx:itemRenderer>
     <mx:Component>
     <mx:CheckBox selectedField="CHECK_PATH" change="data.CHECK_PATH=selected" />
     </mx:Component>  
    </mx:itemRenderer>
     </mx:DataGridColumn>
     <mx:DataGridColumn dataField="NEW_LAT"/>
     <mx:DataGridColumn dataField="NEW_LONG"/>
     </mx:columns>
     </mx:DataGrid>
    </mx:Application>
    Please let me know clearly what's your problem...Do you want to just bind the check box based on XmlList or something else..?
    Thanks,
    Bhasker Chari.S

Maybe you are looking for