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.

Similar Messages

  • 2 way sync between AddressBook and LDAP

    Hi there. I'm looking for something that will help me do a 2-way sync between an Addressbook and an LDAP server. I've been playing with ABxLDAP/Addressbook4LDAP, and that seems to populate addressbook contacts into an LDAP server (a unidirectional sync). However, I want to do a full 2-way sync (changes made in the ldap server are synced to my local addressbook entries and vice versa).
    Does anyone know of any apps to do that?
    Thanks.

    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.

  • 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

  • Only one way sharing between Macbook and Win XP

    I have suddenly lost connectivity between my Macbook and shared directories on Win XP machine. Shared directories were there, but no longer. No major software upgrades that I know about. XP machine is ethernet wired to router; OS X machine wireless. Can go the other way (XP to Mac) no problem.
    When I try to Go>Server with IP address of XP (192.168.1.100) the following message appears..."The Finder cannot complete the operation because some data in "smb://192.168.1.100" could not be read or written. (Error code -36). Firewalls are off. Can not find mention of Error code 36 on Apple website. Any ideas would be most welcome. Thanks.
    Macbook   Mac OS X (10.4.7)   80G HD; 1G RAM

    Not very helpful, but -36 is...
    File System Errors
    -36 ioErr I/O error
    It may be permissions that need repairing in Disk Utility, so try that first. Next it might be a bad Alias or bad .plist.

  • Two-way or only one-way syncing between G4 and mobile??

    I have a Sony Ericcsson k750i mobile. When I first got it, I went through my Address Book (on my powerbook) and sorted it all out and synced with the phone (so all the numbers in the Address Book transfered to the phone). No problem. But now, if I sync, with isync, any numbers / names I have saved in the phonebook of the phone (say, I meet someone new when I'm out and take their number, put it directly in my phone) are erased. The sync, therefore, is ONE WAY, from the powerbook to the phone. Any new entries on the phone are scrapped.
    Is there a way to avoid this happening? I looked in isync but I don't find. It's a pretty stupid system if you can't have a two-way street when you're syncing.
    Any ideas much appreciated

    How? Does isync say something like, "There are contacts / numbers on your phone which are not in your Address Book. Do you want to copy them there?" to which you would reply Yes?
    How do you do it?

  • Does syncing using the music tab a 2 way street between device and computer?

    So i went through my music and added ratings to it on my comjputer.  i synced my ipod with auto sync and everything transfered over fine.  then i accidently added a folder to my itunes library i didnt want and rather then sift through the library and remove the songs added from that folder (since it wasnt my music) i decided to erase the entire library and just re add the folder withonly my music.  i thought the ratings would still be there, but they wre all gone.  all that work.  even my playlists were gone.  i mean, they were still there, but no music was in them.  even after i re added the same music that once was once there, the playlist didnt auto populate themselves.  lets just say i messed everything up, and since my ipod was on auto sync, i knew the next time i plugged it in it would erae all the ratings and playlists.  so i used a program called iexplorer and it let me copy all my music back to itunes and i got most of my ratings back (not the playlist though because my computer crashed while the playlists were being populated and totally forgot about itunes and auto sync, so when i opened ituens, my ipod started syncing and basically it synced the new un orginized library with no playlist and most of the star ratings.  For some reason not all the songs had the ratings, but most did. so i cant complain cuz i at least got lucky.  ok, now onto the question.  i dont want to go through my library again and re do everything, so im going to do it slowly through the ipod while im in transit.  my question is, when i update  playlist and rate music on the ipod, wheni plug it into ituens, will the ratings and playlist i made on the ipod transfer over?  i know this was quite the long post for such a simple question, but i just wanted to share my bumble headed story of how i nuked my library.

    The sync is one way -  computer to ipod.

  • No 2 way connection between printer and computer HELP HELP going nuts!!!

    On the hp website in downloads for hp officejet 6500 series for windows 7 is "additional information' for installing that particular printer for that windows 7, now under  "printer setup not complete" it says how to bypass the problem I have though those comands obviously don't work with my windows xp so can someone translate those commands for windows xp so i could try and fix my problem (hope that all makes sense)  Also a few questions, the network is setup and passed so should i need to change any ports or does the network setup do it itself?  Do you have to have a separate printer icon for usb and wireless,(though i won't need usb when i get this sorted).  And why does the hp solution centre no open it comes up with a file that cannot run how do i fix this?  HELP

    The sync is one way -  computer to ipod.

  • Different Between In and Join Function of Query

    Hi Team,
    I have confuse for the below query getting different count.
    Version DB :-
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Query:-1
    Getting Count :-3917
    SELECT COUNT (*)
      FROM stg_ser_level_inv_db a, map_stg_gsm_serv b
    WHERE a.account_number_v IN (SELECT account_number_v
                                    FROM map_transaction_number MAP
                                   WHERE MAP.trans_type_v IN ('F', '4'))
       AND a.trans_num_v
                        IN (SELECT trans_num_v
                              FROM map_transaction_number MAP
                             WHERE MAP.trans_type_v IN ('F', '4'))
       AND a.trans_type_v
                         IN (SELECT trans_type_v
                               FROM map_transaction_number MAP
                              WHERE MAP.trans_type_v IN ('F', '4'))
       AND a.acct_no = b.stg_account_number
       AND a.serv_account_number_v= b.stg_serv_link_code
       AND NOT EXISTS (
              SELECT 1
                FROM cb_sub_ar_ap ar
               WHERE ar.account_link_code_n = b.ab_serv_acc_link_code
                 AND ar.bill_cleared_flg_v = 'N'
                 AND ar.trans_num_v IN (SELECT target_trans_num_v
                                          FROM map_transaction_number MAP
                                         WHERE MAP.trans_type_v IN ('F', '4')))--3917why when u IN condition and join condition count is different. please let me know why?
    Thanks for advance ...
    Second :-2 Join Condition
    Total Count :-789948
    select COUNT(*)
        FROM STG_SER_LEVEL_INV_DB A , MAP_STG_GSM_SERV B,MAP_TRANSACTION_NUMBER ARAP_CUR
    WHERE  A.ACCOUNT_NUMBER_V = ARAP_CUR.ACCOUNT_NUMBER_V
    AND A.TRANS_NUM_V  = ARAP_CUR.TRANS_NUM_V
    AND A.TRANS_TYPE_V = ARAP_CUR.TRANS_TYPE_V
    AND A.ACCT_NO = B.STG_ACCOUNT_NUMBER
    and a.SERV_ACCOUNT_NUMBER_V  = B.STG_SERV_LINK_CODE
    and ARAP_CUR.TRANS_TYPE_V in ('F','4')
    and not exists (select 1 from CB_SUB_AR_AP ar
          where ar.account_link_code_n = B.AB_SERV_ACC_LINK_CODE
          and AR.BILL_CLEARED_FLG_V = 'N'
          and ar.trans_num_v = ARAP_CUR.TARGET_TRANS_NUM_V);---789948

    Hi,
    Whenever you have a problem, please post a complete test script that people can run to re-create the problem and test their ideas. Include a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data. In this case, data that produced no more than 10 rows of output for each query should be plenty.
    Simplify the problem as much as possible. For example, it looks like both your queries are joining tables a and b the same way. Why not pretend that you have only 1 table, ab, that is the same as the result set of joining a and b? Post CREATE TABLE and INSERT statements for the relevant columns of ab.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}
    There are several differences between those two queries.
    For one thing, Query 1 is doing a 2-way join between a and b, and then filtering that result set by comparing it to another table (let's call it map). So if a contains 5 rows and b contains 2 rows, the result set will contain at most 5 * 2 = 10 rows. Perhaps only 8 of those 10 rows will have matching rows in map. Note that the number of rows in map, or how many rows in map match rows in a or b doesn't matter. Query 2, on the other hand, is doing a 3-way join of a, b and map, so if map has 100 rows, the result set could have as many as
    (5 * 2) * 100 = 1000 rows. We know that it won't have that many rows, because only 8 out the rows from the a-b join have matching rows in map, but the result set of the 3-way join could still have as many as
    (8) * 100 = 800 rows.
    Since you didn't post test versions of your tables, I'll use tables from the scott schema to illustrate. Scott.dept has 4 rows, only 3 of which match rows in scott.emp, so
    SELECT  d.*
    FROM     scott.dept  d     -- tables a and b in your query play this role
    WHERE     d.deptno  IN (
                      SELECT  e.deptno
                   FROM     scott.emp  e     -- map plays this role in your query
    ;produces 3 rows of output. Exactly how many rows are in emp (that number happens to be 14) and how many of those rows match rows in dept (that happens to be 14, also) doesn't matter; all that matters in the query above is that 3 of the rows in dept have matches. However, the fact that 14 of the rows in emp have matches is important in the query bleow:
    SELECT     d.*
    FROM     scott.dept  d
    JOIN     scott.emp   e  ON  d.deptno  = e.deptno
    ;which produces 14 rows of output.
    Another differece is that Query 1 says that there are 3 conditions that relate table a to map; a given row in a will be included in the result set if any row in map meets condition 1, any row in map meets condition 2, and any row in map meets condition 3. It doesn';t matter if you have to look at 2 or 3 rows in map to meet all those conditions. Query 2 says that a row from a will be included only if there is a single row in map that meets all 3 conditions.

  • HT1386 Is there any way to do a two way sync between iphone contacts & outlook on a pc?

    I have contacts on my iphone which i keep updated. However, i need these changes to be applicable on outlook as well. I prefer updating contacts on outlook when i have to do it on large scale. I have over 1000 contacts in my iphone. Is there any way by which i can do a two way sync between iphone and outlook on a pc.

    Take a look at this article:
    iOS: How to transfer or sync content to your computer
    Contacts, Calendars, Bookmarks, and Notes
    You can sync contacts, calendars, bookmarks, and notes with other applications on your computer. This allows you keep all your information in sync across multiple computers and iOS devices. The settings for these items are all in the Info tab for your iOS device in iTunes. With your iOS device connected to the computer, select your iOS device. Then click the Info tab.
    For details on syncing content on your iOS device with your computer, click the sections below.
    Contacts
    To sync contacts with your computer, choose "Sync Contacts with" within iTunes for Windows, or "Sync Address Book Contacts" on your Mac.
    You can sync your contacts with:
    Microsoft Outlook 2003, Microsoft Outlook 2007, Microsoft Outlook 2010 (Windows XP, Windows Vista, or Windows 7)
    Windows Address Book (Windows XP)
    Windows Contacts (Windows Vista / Windows 7)
    Address Book (Mac OS X)
    Microsoft Entourage 2004, Microsoft Entourage 2008, or Microsoft Outlook 2011 for Mac
    Note: If using Microsoft Entourage, use Microsoft Entourage 2008 12.1.2 or later if syncing with Mac OS X v10.6 or later. If you would like to sync data on your Mac with Entourage, enable syncing between Entourage and Address Book.
    Notes:
    When syncing contacts, you can choose to sync all of your contacts or only selected groups. The option to sync selected items may not show up until after the first sync.
    You can select a group of contacts to which all new contacts created on your iOS device will be added.
    Additional options for syncing include syncing your contacts with Yahoo or Gmail/Google Mail. You will need to configure it with the user name and password for your Yahoo or Google account.

  • Rearrange between dataset and datagrid

    I binding between a dataset and a datagrid an all works fine
    and I can see all fields of my dataset in the datagrid (name,
    last_name, phone, fax,...).
    I want now to show only the field name, fax and phone in my
    datagrid and I have tried changing formater in databinding.
    I use
    formater: Rearrange fields
    formatter option:
    {"name=<name>;fax_number=<fax>;telephone=<phone>"}
    but this fails
    Someone know a easy way to do this?
    Thanks

    download "Dataset connection wizard" extension.
    its simple useful and visual ;)

  • The best way to transfer videos between devices and mac?

    I have an iphone 4s, ipad and a macbook pro - is there any way to transfer videos wirelessly betwen these platforms?
    As far as I know icloud only allows photostream of photos only but nit videos. This is quite inconvenient for video users as I normally take videos using my iphone 4s and would like to edit using ipad/mac's iMovie. I suppose I could transfer videos using a wire between iphone and Mac (still a PAIN without being able to transfer wirelessly), and what about between iphone and ipad? I understand Apple might be concerned about storage and speed for video transfer via icloud, if we could selectively do the transfer and have the option to delete them from icloud after the transfer it will be very much easier for video editor like myself.
    Or have I just missed something? Is there indeed a way to do so??

    If you want to transfer photos and videos from the Mac to the iPhone (but not in the other direction) you can use iTunes and sync via wi-fi: http://support.apple.com/kb/HT1386
    If you want to wirelessly tranfer videos in the other direction you may want to look into a 3rd party app such as http://www.photosync-app.com Note that I have not used that app so be sure to investigate others as well.

  • Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Export the slideshow out of iPhoto as a QT movie file via the Export button in the lower toolbar.  Select Size = Medium or Large.
    Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
    Follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    If iDVD was not preinstalled on your Mac you'll have to obtain it by purchasing a copy of the iLife 09 disk from a 3rd party retailier like Amazon.com: ilife 09: Software or eBay.com.  Why, because iDVD (and iWeb) was discontinued by Apple over a year ago. 
    Why iLife 09 instead of 11?
    If you have to purchase an iLife disc in order to obtain the iDVD application remember that the iLife 11 disc only provides  themes from iDVD 5-7.  The Software Update no longer installs the earlier themes when starting from the iLIfe 11 disk nor do any of the iDVD 7 updaters available from the Apple Downloads website contain them. 
    Currently the only sure fire way to get all themes is to start with the iLife 09 disc:
    This shows the iDVD contents in the iLife 09 disc via Pacifist:
    You then can upgrade from iDVD 7.0.3 to iDVD 7.1.2 via the updaters at the Apple Downloads webpage.
    OT

  • Is there an easy way to switch mini dvi between monitor and tv?

    I would like to be able to connect my mini's dvi output to a either a monitor or my tv. I am not trying to get a display on both simultaneously. With a DVI to DVI cable between mini and monitor and a dvi to hdmi cable between mini and tv I think that I can swap dvi connections at the mini, but that looks like a pain. Is there an easier way to do this?
    I am about to order the dvi to hdmi cable. Is the mac mini's dvi port hot plugable or do I need to put the mini to sleep or shut down? Thanks,
    Owen

    Welcome to Apple Discussions!
    Without some extra hardware, you can't. The mini, like all Macs, looks for data from the display to determine what settings it makes available to the user, so with two displays connected and feeding their available configurations, the mini will get very confused! Even if the two displays have one or more common settings that will actually work, each time the mini boots or wakes and detects the display, one or other (or both) are likely to go blank.
    There are adaptors you might consider, such as those from Gefen, but they are not inexpensive. Have a look at http://www.gefen.com/kvm/dproductlisting.jsp?listingCategory=Switchers&productTy pe=dvi for a list of available switching options, though beware that for the most part, the need being met is for TWO sources and ONE display, not your ONE source and TWO displays.

  • Best way to transfer video between iphone and mac wirelessly?

    Please suggest me the best way to transfer files between mac and iphone wirelessly.Mainly for videos.

    If you want to transfer photos and videos from the Mac to the iPhone (but not in the other direction) you can use iTunes and sync via wi-fi: http://support.apple.com/kb/HT1386
    If you want to wirelessly tranfer videos in the other direction you may want to look into a 3rd party app such as http://www.photosync-app.com Note that I have not used that app so be sure to investigate others as well.

  • [vmware] Best way to share files between host and client

    Good afternoon!
    I have successfully installed VMware server on my machine and set up a virtual machine, powering Windows XP for study issues (emulation via wine does not do the trick for me). The virtual machine runs fast and stable but does not meet my requirements unless I have two issues faced:
    First:
    How to access a USB pendrive monunted by the host system properly within the client?
    Second:
    What is the best way to share file system space between host and client? Should I set up a Samba share which is accessible for both host and client or is it save to grant my VM access to my physical hard disc as a whole (using it as a partition)?
    Thanks for answers in advance, I have still quite a lot to learn, when it comes to VMs.
    Regards,
    ~cg

    Do not setup your VMware to be able to access your physical disk as a whole. This would have you mounting the filesystem twice, corrupting it in the process.
    You /can/ setup VMware with Sharing Folders that lets you share your filesystem (either / or just /home or something else) and that is what I would recommend.
    As for accessing the pen drive from both operating systems at once, I'd say use the same Sharing Folders method. I always share /mnt so that I can access my cdrom/USB/etc from the vmware OS.
    The sharing folders is basically the same as a samba share, but uses vmware's own method (HGFS). Samba is more secure (if you are worried about your VMware OS breaking from it's shell and attacking your real filesystem, which is unlikely). You need the vmware tools installed to make use of it.

Maybe you are looking for