2 Replies Latest reply on Nov 2, 2015 11:52 AM by hissizadam

    Binding To Listed Items in DataGrid

    hissizadam Level 1

      I listed data in xml database file. My database file is contain a personal records (name, tel. mail, city etc.)

      I want to binding selected item from list to personal detail page.

       

      Listed Data in DataGrid

      PwhBy.png

      Personal details Page.

      zLgAI.png

       

      thanks

        • 1. Re: Binding To Listed Items in DataGrid
          dennisfalling

          The DataGrid documentation has a good example of binding to selected item.

           

          DataGrid - Adobe ActionScript® 3 (AS3 Flex) API Reference

          • 2. Re: Binding To Listed Items in DataGrid
            hissizadam Level 1

            firstly thanks,

             

            i look at the references,

            i using a xml database files and getting to data using a local data service.

             

            codes :

             

            <?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"

                    xmlns:katistemployees="services.katgenelmud.*"

                    xmlns:empistanbul="services.empgenelmud.*"

                    creationComplete="srv.send()" title="Genel Müdürlük">

             

               <fx:Script>

                <![CDATA[

                    import com.adobe.serializers.utility.TypeUtility;

                   

                    import mx.events.FlexEvent;

                 

                protected function Home_clickHandler(event:MouseEvent):void

                {

                    navigator.pushView(views.EmployeeDirectoryHomeView);   

                }

                 ]]>

                </fx:Script>

               

                <fx:Script>

                    <![CDATA[

                        import mx.events.FlexEvent;

                        import spark.events.IndexChangeEvent;

                        protected function Kategori_clickHandler(event:MouseEvent):void

                        {

                            navigator.pushView(views.Kategori);   

                        }

                    ]]>

                </fx:Script>

               

               

                <fx:Declarations>

                    <s:HTTPService id="srv" url="assets/empgenelmud.xml"/>

                </fx:Declarations>

               

               

                <s:actionContent>

                    <s:Button icon="@Embed('assets/search.png')" click="Home_clickHandler(event)"/> 

                    <s:Button icon="@Embed('assets/kategori.png')" click="Kategori_clickHandler(event)"/>

                </s:actionContent>

                 

                <s:DataGrid width="100%" height="100%" dataProvider="{srv.lastResult.list.employee}">

                    <s:columns>

                        <s:ArrayList>

                            <s:GridColumn dataField="firstName"

                                          headerText="Ad"/>

                            <s:GridColumn dataField="lastName"

                                          headerText="Soyad"/>

                            <s:GridColumn dataField="title"

                                          headerText="Ünvan"/>

                            <s:GridColumn dataField="city"

                                          headerText="Bölge"/>

                            <s:GridColumn dataField="bolgeKodu"

                                          headerText="Bölge Kod"/>

                            <s:GridColumn dataField="department"

                                          headerText="Müdürlük"/>

                        </s:ArrayList>

                    </s:columns>

                </s:DataGrid>

             

            </s:View>

             

            how do i bind listed data to another screen personal details  (mxml  file)

             

            zLgAI.png

             

            bye