Bind two DataGrids so that a change in one will be refelected in another

Is there a simple way to bind two DataGrids so that a change in one will be refelected in another?  I have two DataGrids.  One will be editable and the other will be used to display the information from the editable DataGrid in a confirmation section.  Is there a simple example  out there for doing this?
Thanks,
Lee

I may have figured it out.  It seems to be working with:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="initComponent()"
xmlns:views="com.views.*"
width="100%"
height="100%">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
private var currentIndex:int=0;
private function initComponent():void
refreshList(null);
public function refreshList(event:Event):void
this.roArtist.getArtists();
private function getArtists_result(event:ResultEvent):void
dgArtistList.dataProvider=event.result as ArrayCollection;
dgArtistList.selectedIndex=currentIndex;
dgArtistListConfirm.dataProvider=event.result as ArrayCollection;
dgArtistListConfirm.selectedIndex=currentIndex;
]]>
</mx:Script>
<mx:RemoteObject id="roArtist"
showBusyCursor="true"
destination="ColdFusion"
source="art.src.cfc.artist">
<mx:method name="getArtists"
   result="getArtists_result(event)">
</mx:method>
</mx:RemoteObject>
<mx:Label x="10"
  y="10"
  text="Entry"
  fontWeight="bold"/>
<mx:DataGrid id="dgArtistList"
x="10"
y="36"
editable="true">
<mx:columns>
<mx:DataGridColumn dataField="ARTISTID"
   headerText="ArtistID"
   editable="false"/>
<mx:DataGridColumn dataField="FIRSTNAME"
   headerText="First Name"
   editable="true"/>
<mx:DataGridColumn dataField="LASTNAME"
   headerText="Last Name"
   editable="true"/>
</mx:columns>
</mx:DataGrid>
<mx:Label x="10"
  y="210"
  text="Confirmation"
  fontWeight="bold"/>
<mx:DataGrid id="dgArtistListConfirm"
x="10"
y="236" dataProvider="{ArrayCollection}">
<mx:columns>
<mx:DataGridColumn dataField="ARTISTID"
   headerText="ArtistID"/>
<mx:DataGridColumn dataField="FIRSTNAME"
   headerText="First Name"/>
<mx:DataGridColumn dataField="LASTNAME"
   headerText="Last Name"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
I need to do some testing.
Thanks!

Similar Messages

  • TS1702 Change from one country App Store to another country

    How doe one change from one country App Store to another country ????

    When I try to change my country in the Account section of the App Store (and the ITunes Store)  I receive the message "You have a store credit balance; you must spend your balance before you can change stores."
    I am unable to understand the reason for this and can't find a way around this. The amount of credit remaining in my account is less than the price of any App or Song.
    I am also concerned after reading other threads that if I change countries, whether the Apps purchased in one country will still be available in the new country.
    Some have proposed using credit cards to change the country for the account, but  accounts funded through vouchers exclusively should be able to be able to change countries without this requirements.
    Thanks in advance for any solutions or comments.

  • Binding two datagrid in one to many relationship

    hello all,
    I've my 2 object that rappresent that describe my XML file:
    public class Page
    public string PageName { get; set; }
    public string Description { get; set; }
    public ObservableCollection<Param> Params;
    public class Param
    public string Name { get; set; }
    public string Address { get; set; }
    public string Format { get; set; }
    public string Description { get; set; }
    The first datagrid, is populated in this way:
    <Window x:Class="DataGridXML2.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525"
    DataContext="{Binding Main, Source={StaticResource Locator}}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="200" />
    <ColumnDefinition Width="400*" />
    </Grid.ColumnDefinitions>
    <DataGrid Name="grid1"
    ItemsSource="{Binding Pages}"
    SelectedItem="{Binding SelectedPage}"
    AutoGenerateColumns="False">
    <DataGrid.Columns>
    <DataGridTextColumn Header="pageName" Binding="{Binding PageName}"/>
    <DataGridTextColumn Header="description" Binding="{Binding Description}"/>
    </DataGrid.Columns>
    </DataGrid >
    </Grid>
    </Window>
    I'm in difficulty, I would show in a second grid list of parameters contained in the list "Params" by the selection of the item of the first grid. My ViewModel is :
    namespace DataGridXML2.ViewModel
    public class MainViewModel : ViewModelBase
    private readonly IConfigService configService;
    #region Pages
    private ObservableCollection<Page> pages;
    public ObservableCollection<Page> Pages
    get { return pages; }
    set
    pages = value;
    RaisePropertyChanged(() => Pages);
    #endregion
    #region SelectedPage
    private Page selectedPage;
    public Page SelectedPage
    get
    return selectedPage;
    set
    selectedPage = value;
    RaisePropertyChanged(() => SelectedPage);
    #endregion
    /// <summary>
    /// Initializes a new instance of the MainViewModel class.
    /// </summary>
    public MainViewModel(IConfigService configService)
    this.configService = configService;
    pages = configService.GetPages(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Visual Studio 2013\Projects\Binding\DataGridXML2\TEST.xml");
    thanks in advance

    Not sure if I'm missing something.
    Isn't it just a matter of:
    <DataGrid Name="grid2"
    ItemsSource="{Binding SelectedPage.Params}"
    Hope that helps.
    Technet articles: Uneventful MVVM;
    All my Technet Articles

  • Bind two datagrid conrols.  As in selection in dg1 determines the data that shows in dg2

    I am working on a back office app for my company and I have been playing with WaveMaker and Flash Builder.
    In WM I can have dg2 show data dependant on dg1 like I select a customer in dg1 the dg2 displays all devices that customer has registered to them.
    http://184.73.199.26:8080/jim2  << This is my wavemaker version on amazon EC2 (no domain name)  log in as limit pw:limit
    the code that FB4.5 has auto generated is as follows
    http://pastebin.com/bYbjA1zu
    so that you are fair warned.  I only installed FB4.5 like two days ago.  I have very little experience with PHP/JS/AS.  I am not asking for you to do it for me but some agnostic code would be great
    Thanks all.

    I got it.  changed the service php file to this
    $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename where cust_id=?");
    instead of
    $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename where dev_id=?");
    Then in the selection change handler for dg1 added this line
    getDeviceByIDResult.token = deviceService1.getDeviceByID(dataGrid.selectedItem.id);

  • How to join two crosstabs such that they appear as one?

    Hi
    I tried to join two cross tabs such that they appear to be one. I tried the format the view of the cross tabs by setting the value of top and bottom padding as zero but it is not working. It is taking some default space between the cross tabs.
    Is it possible to join the crosstabs?
    Thanks
    Jasleen

    I set the wrong case .my question has been answered..
    Thank you ~
    Edited by: Richard 1982 on 2009-12-27 下午9:55

  • PDI changes of one developer not visible to another

    Hi,
    If the PDI changes done by a developer from a SDK solution, activated on the tenant, are to be viewed by another PDI developer or Administrator or any other user in C4C for testing purpose,
    is there any setting to be done ?
    If yes, what and how ? Plz guide.
    Thanks, Sachin.

    Hi Vinod,
    looks like my text was not fully understandable. Let me give an e.g. :
    Suppose developer1 adds a dropdown field to search UI and activates the changes.
    developer1 logs into C4C UI and finds the required field in the UI.
    Now developer2 OR admin user logs into C4C UI and checks if the same field is displayed in the UI, but cannot see it on the screen.
    I want the field (dropdown) to be visible to all users of C4C in the C4C UI.
    Now, kindly let me know if any solution on this ?
    Thanks, Sachin.

  • I have two apple devices and i wanna reset one will the other ones data delete too?

    The devices are iPhone 4s and ipad 2

    I'm not sure what you mean by "reset" but you can restore it, erase all content and settings, or reset it by holding the power and home buttons until you see the Apple logo, then releaseing, and it won't effect the data in iCloud or on your other device.

  • Best way to mark data that has changed when it is edited in  a spark datagrid?

    I am not sure if this is the best way to mark data that has changed (isModifiedClientSide ) when it is edited in  a spark datagrid:
    <GridColumn  width="140" headerText="Margin "dataField="margin" editable="false"  editable.editMode="true"  >
                        <itemRenderer>
                            <fx:Component>
                                <DefaultGridItemRenderer textAlign="right"   background="true" backgroundColor="#ffffff"  alpha="1.0" color="#000000" >
                                    <focusOut>
                                        <![CDATA[
                                        this.data.isModifiedClientSide = 1;
                                        ]]>
                                    </focusOut>
                                </DefaultGridItemRenderer>
                            </fx:Component>
                        </itemRenderer>
                    </GridColumn>

    I tried this but the value commit doesnt't get fired bro:
        <GridColumn  width="140" headerText="Margin (disabled)" headerText.editMode="Margin (editing)" dataField="margin" editable="false"  editable.editMode="true"  >
                        <itemEditor>
                            <fx:Component>
                                <DefaultGridItemEditor>
                                    <valueCommit>
                                        <![CDATA[
                                        this.data.isModifiedClientSide = 1;
                                        ]]>
                                    </valueCommit>
                                </DefaultGridItemEditor>
                            </fx:Component>
                        </itemEditor>
                    </GridColumn>
    what do you think?

  • Software updates sometimes do not install. I have two software updates that I continually show up as available to install. When I click on the install button it changes to installed. Checked About this Mac shows that the updates have not installed.

    Software updates sometimes do not install. I have two software updates that I continually show up as available to install. When I click on the install button it changes to installed. Checked About this Mac shows that the updates have not installed.

    What are the updates?

  • Handle Form Setting in a user form with two DataGrid

    Hi,
    I have a user form with two dataGrid.
    I'd like to handle the 'form settings' button for both DataGrid, but i'm not able to do it (i'm able just for the first matrix)
    This is the code:
    form.Settings.Enabled = True
    form.Settings.MatrixUID = GRID1
    There is the possibilities to swicth from GRID1 to GRID2?
    Regards
    Marco

    Hi Marc,
    you can active the settings only for one of them
    the second point is that you enable the old one.
    first change the UID than enable it.
    frm.Settings.MatrixUID = "mtxList2"
    frm.Settings.Enabled = True
    regards
    David

  • Two Datagrids, Multiple Provider Issue

    What Im trying to do is when when DataGrid1 has an item
    selected it fills out a series of text boxes and another DataGrid.
    All the data is in XML, so when I click on one element, to access
    the proper element i go data_grid1.selectedItem.state
    But for the second DataGrid the data that goes into there is:
    <people>
    <person email=...>
    </people>
    and the dataPovider i use is data_grid1.selectedItem.people,
    I get
    Multiple initializers for property 'dataProvider'. (note:
    'dataProvider' is the default property of
    'mx.controls.DataGrid')
    In
    this
    example I tried doing what he did and his examples compile with
    no problems but I dont know how to do that for myself, what am I
    doing wrong?
    <?xml version="1.0" encoding="UTF-8"?>
    <mx:Application xmlns:flexlib="
    http://code.google.com/p/flexlib/"
    xmlns="*" xmlns:mx="
    http://www.adobe.com/2006/mxml"
    height="100%" width="100%" applicationComplete="getXML()">
    <mx:Script>
    <![CDATA[
    import mx.rpc.http.HTTPService;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.controls.Alert;
    public function getXML():void
    var serv:HTTPService = new HTTPService();
    serv.contentType="application/xml";
    serv.url="contacts.xml";
    //serv.useProxy=false;
    serv.resultFormat="xml";
    serv.addEventListener("result",gotResult);
    serv.addEventListener("fault",gotFault);
    serv.send();
    private function gotFault(event:FaultEvent):void
    Alert.show(event.fault.message);
    [Bindable]
    var myXML:XML;
    private function gotResult(event:ResultEvent):void
    myXML = new XML(event.result);
    //avListing.dataProvider = myXML.contact;
    public function searchAndReplace(holder:String):String
    var searchfor:String="\t";
    var replacement:String="";
    var temparray:Array= holder.split(searchfor);
    var holder:String = temparray.join(replacement);
    searchfor="\r";
    temparray= holder.split(searchfor);
    holder = temparray.join(replacement);
    return (holder);
    ]]>
    </mx:Script>
    <mx:Binding source="myXML.contact" destination
    ="avListing.dataProvider"/>
    <mx:Binding source="avListing.selectedItem.people as XML"
    destination="grid_contacts.dataProvider"/>
    <mx:HBox width="100%" height="100%">
    <mx:DataGrid id="avListing" width="25%" height="100%">
    <mx:columns>
    <mx:DataGridColumn dataField="state"
    headerText="State"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:TextArea id="box_State"
    text="{avListing.selectedItem.state}" width="100" height="20"/>
    <mx:TextArea id="box_Address"
    text="{searchAndReplace(avListing.selectedItem.address)}"
    width="250" height="100"/>
    <mx:DataGrid id="grid_contacts" width="300"
    height="100">
    <mx:DataGridColumn dataField="person"
    headerText="Person"/>
    </mx:DataGrid>
    </mx:HBox>
    </mx:Application>

    I had done that before, even though the ids are different I
    get that error. The reason I was using the Binding was that I was
    following this example:
    http://blog.paranoidferret.com/index.php/2007/07/27/flex-friday-feature-datagrid-component /
    They have two datagrids in there yet it works. Now is this
    happening just because I am using Flex 2.01 SDK instead of using
    the builder? I've noticed that there is a difference between the
    two when it comes to getting things to work.

  • I am changing ISPs and will be dropping two email addresses I use as AppleID's.  Can I keep them as AppleID's and use a rescue e-mail address from a new ISP?  What are the downsides if I have an iCloud address as an alias under one of those addresses?

    I am about to change internet service providers and will be dropping two e-mail addresses that I use as Apple ID’s.  One is used solely for iTunes and the other is used for iCloud, mail, calendars, etc.  The second has two iCloud email address as aliases.  I will be going to a new ISP and will establish an e-mail address from that ISP as a backup in case the iCloud addresses are not available. 
      It has been suggested to me that I should continue to use the e-mail addresses from the old ISP as my Apple ID’s.  And that I use the e-mail address from the new ISP as a rescue e-mail address for those Apple ID’s to get any communications relating to the ID’s. That seems like a simple and straight-forward way of handling the change and would minimize the chance of complications from changing the Apple ID’s.  But, are there any downsides to handling the change in this way?  If so, what are they?

    You can continue to use them as Apple ID's, change the rescue address (as you know)
    You can use your iCloud address, but it won't be an alias, it's a full email address.

  • I can't delete partition in disk utility, it keeps telling me that "the changes are too small"

    I previously split my disk into two different disks, however I want to combine them together again, yet i was unable to delete the second partition. I can't delete partition in disk utility, it keeps telling me that "the changes are too small"
    Plz help!!!!!!

    Make at least two complete backups of all your data. Boot from another drive and partition this one as desired. Restore the data.

  • Photos does not support external editing like iPhoto. Is there likely to be an upgrade to change this or will I abandon Photos for software that does support editing in Photoshop?

    Photos does not support external editing like iPhoto. Is there likely to be an upgrade to change this or will I abandon Photos for software that does support editing in Photoshop?

    iPhoto does work and there is an upgrade:
    Go to the App Store and check out the Purchases List. If iPhoto is there then it will be v9.6.1
    If it is there, then drag your existing iPhoto app (not the library, just the app) to the trash
    Install the App from the App Store.
    Sometimes iPhoto is not visible on the Purchases List. it may be hidden. See this article for details on how to unhide it.
    http://support.apple.com/kb/HT4928
    One question often asked: Will I lose my Photos if I reinstall?
    iPhoto the application and the iPhoto Library are two different parts of the iPhoto programme. So, reinstalling the app should not affect the Library. BUT you should always have a back up before doing this kind of work. Always.

  • How to separate two thumbnail images that open same picture?

    Just when I think I have some code figured out I cannot for the life of me figure this out...
    Ok the fourth page of the website is a portfolio page with 16 thumbnails (4 across 4 down) which opens a larger pic on the same page to the right.
    I can't figure out what to change. The first and third thumb down seem to be linked and open the same image. Same with two and two down from that and so on. I want to separate them so each open their own image. If I edit it in PS both thumbs change...
    I click several times and well thumb one and the third one down is:
    onClipEvent (load) {
       i = 1;
    Button around each thumb:
    on (rollOver) {
        gotoAndPlay(2);
    on (releaseOutside, rollOut) {
        gotoAndPlay(20-_currentframe);
    on (release) {
        _root.gal_old.gotoAndStop(_root.gal_new._currentframe);
        _root.gal_new.gotoAndStop(i+1);
        _root.gal_new2.gotoAndStop(i+1);
        _root.gal_all.gotoAndPlay("p1");
    Thanks

    Not sure what you mean sorry
    The only other code I can find is the static image that sits on the right until someone clicks a thumb and can change it
    onClipEvent (load) {
        _root.gal_new2 = this;

Maybe you are looking for