How to move a selected row data from one grid to another grid using button click handler in flex4

hi friends,
i am doing flex4 mxml web application,
i am struck in this concept please help some one.
i am using two seperated forms and each form having one data grid.
In first datagrid i am having 5 rows and one button(outside the data grid with lable MOVE). when i am click a row from the datagrid and click the MOVE button means that row should disable from the present datagrid and that row will go and visible in  the second datagrid.
i dont want drag and drop method, i want this process only using button click handler.
how to do this?
any suggession or snippet code are welcome.
Thanks,
B.venkatesan.

Hi,
You can get an idea from foolowing code and also from the link which i am providing.
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
width="613" height="502" viewSourceURL="../files/DataGridExampleCinco.mxml">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.binding.utils.BindingUtils;
[Bindable]
private var allGames:ArrayCollection;
[Bindable]
private var selectedGames:ArrayCollection;
private function initDGAllGames():void
allGames = new ArrayCollection();
allGames.addItem({name: "World of Warcraft",
creator: "Blizzard", publisher: "Blizzard"});
allGames.addItem({name: "Halo",
creator: "Bungie", publisher: "Microsoft"});
allGames.addItem({name: "Gears of War",
creator: "Epic", publisher: "Microsoft"});
allGames.addItem({name: "City of Heroes",
creator: "Cryptic Studios", publisher: "NCSoft"});
allGames.addItem({name: "Doom",
creator: "id Software", publisher: "id Software"});
protected function button1_clickHandler(event:MouseEvent):void
BindingUtils.bindProperty(dgSelectedGames,"dataProvider" ,dgAllGames ,"selectedItems");
]]>
</mx:Script>
<mx:Label x="11" y="67" text="All our data"/>
<mx:Label x="10" y="353" text="Selected Data"/>
<mx:Form x="144" y="10" height="277">
<mx:DataGrid id="dgAllGames" width="417" height="173"
creationComplete="{initDGAllGames()}" dataProvider="{allGames}" editable="false">
<mx:columns>
<mx:DataGridColumn headerText="Game Name" dataField="name" width="115"/>
<mx:DataGridColumn headerText="Creator" dataField="creator"/>
<mx:DataGridColumn headerText="Publisher" dataField="publisher"/>
</mx:columns>
</mx:DataGrid>
<mx:FormItem label="Label">
<mx:Button label="Move" click="button1_clickHandler(event)"/>
</mx:FormItem>
</mx:Form>
<mx:Form x="120" y="333">
<mx:DataGrid id="dgSelectedGames" width="417" height="110" >
<mx:columns>
<mx:DataGridColumn headerText="Game Name" dataField="name" width="115"/>
<mx:DataGridColumn headerText="Creator" dataField="creator"/>
<mx:DataGridColumn headerText="Publisher" dataField="publisher"/>
</mx:columns>
</mx:DataGrid>
</mx:Form>
</mx:Application>
Link:
http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/ae9bee8d-e2ac-43 c5-9b6d-c799d4abb2a3/
Thanks and Regards,
Vibhuti Gosavi | [email protected] | www.infocepts.com

Similar Messages

  • How to move multi select rows(records)from one datagrid to another datagrid completelly in flex4

    hi friends,
    I  am doing mxml flex 4 wep application i am using 2 forms, each form i am using datagrid,i am struck in this place,
    my proplem is, in first form i am having a grid with 10rows and columns,i am having 10 records and one move button. Next form also having a datagrid,
    need:
    IF i am doing multi select(2records) from the first datagrid and click move button means that records will show in the second datagrid and will also delete
    from the first data grid again it wont show the records in same datagrid.
    how to do this?
    any useful suggession or snippet code.
    thanks in advance,
    Cheers,
    B.venkatesan.

    One solution could be:
    Source to data grid is an Array collection
    1.> In first data grid extraxct the rows using, grid.selecteditem
    2.>Add it to the arraycollection attached to next grid, use arraycollection addItemat api if rows needed to ve added at particular index
    3.>Use removeitemat api to remove the items from arraycollection attached to first datagrid
    4.>call invalidate on bothe of the datagrids

  • How to move only subset of data from one database to another?

    Both source & destination are Oracle11g databases.
    The requirement details are as below,
    1) The database contains static as well as transactional data for telecom domain.
    2) We have to move region-wise data from one database to another.
    3) There are around 10 regions.
    4) The region wise data extraction from source db is based on around 40 to 50 tables. Rest of the tables contains
    static data & it will not change.
    5) The volume is around 1 million subscribers per region.
    6) The migration is required because
    a) The client is upgrading its base product which uses this database
    b) There is a change in structure of static tables
    c) Hardware upgrade
    d) The client want to start with single region on new database & rest of the regions will be operated from old
    database.
    7) Keep execution time to very minimum.
    I am thinking to have solution as below,
    1) Create destination database with upgraded db structure (as mentioned in 6b)
    2) Create database links to access source db in destination db.
    3) Write SQL queries to fetch data from all the respective tables for a specific region
    4) Write separate PL/SQL blocks for each table to fetch data from source db & insert into respective table in
    destination db
    a) Use FOR ALL & bulk collect to improve the performance
    b) Divide table data into multiple chunks & execute parallel batches (around 10) to insert the data
    5) Validate pre & post counts to verify the success of migration
    Is there any other better way?
    Regards,
    Sandeep

    How to move only subset of data from a partiular table by using transportable tablespace?
    E.g. SUB table using SMP_SUB tablespace contains subscriber data in source database.
    The indexes defined on SUB table are under SMP_IDX_SUB tablespace
    The subscribers data can be categorized by different regions, say region_id column. Then how to move data & indexes of SUB table from source db to destination db?
    any specific example would be helpful.

  • How to move a specific tablespace datafile from one directory to another

    Database: 10.2.0.1
    OS : Generic
    Problem Description : How to move a specific tablespace datafile from one directory to another considering that the database is on Oracle Dataguard setup
    ** Oracle is working on this issue, but in parallel is opening the topic to the Community so that Community members can add their perspective, experience or knowledge. This will further enhance all knowledge bases including My Oracle Support and My Oracle Support Communities **
    Edited by: ram_orcl on 16-Aug-2010 21:21

    Dear ram_orcl,
    Please follow the procedures here;
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1034172
    8.3.4 Renaming a Datafile in the Primary Database
    When you rename one or more datafiles in the primary database, the change is not propagated to the standby database. Therefore, if you want to rename the same datafiles on the standby database, you must manually make the equivalent modifications on the standby database because the modifications are not performed automatically, even if the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO.
    The following steps describe how to rename a datafile in the primary database and manually propagate the changes to the standby database.
       1.
          To rename the datafile in the primary database, take the tablespace offline:
          SQL> ALTER TABLESPACE tbs_4 OFFLINE;
       2.
          Exit from the SQL prompt and issue an operating system command, such as the following UNIX mv command, to rename the datafile on the primary system:
          % mv /disk1/oracle/oradata/payroll/tbs_4.dbf
          /disk1/oracle/oradata/payroll/tbs_x.dbf
       3.
          Rename the datafile in the primary database and bring the tablespace back online:
          SQL> ALTER TABLESPACE tbs_4 RENAME DATAFILE      2> '/disk1/oracle/oradata/payroll/tbs_4.dbf'
            3>  TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
          SQL> ALTER TABLESPACE tbs_4 ONLINE;
       4.
          Connect to the standby database, query the V$ARCHIVED_LOG view to verify all of the archived redo log files are applied, and then stop Redo Apply:
          SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
          SEQUENCE# APP
          8 YES
          9 YES
          10 YES
          11 YES
          4 rows selected.
          SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
       5.
          Shut down the standby database:
          SQL> SHUTDOWN;
       6.
          Rename the datafile at the standby site using an operating system command, such as the UNIX mv command:
          % mv /disk1/oracle/oradata/payroll/tbs_4.dbf /disk1/oracle/oradata/payroll/tbs_x.dbf
       7.
          Start and mount the standby database:
          SQL> STARTUP MOUNT;
       8.
          Rename the datafile in the standby control file. Note that the STANDBY_FILE_MANAGEMENT initialization parameter must be set to MANUAL.
          SQL> ALTER DATABASE RENAME FILE '/disk1/oracle/oradata/payroll/tbs_4.dbf'
            2> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
       9.
          On the standby database, restart Redo Apply:
          SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
            2> DISCONNECT FROM SESSION;
    If you do not rename the corresponding datafile at the standby system, and then try to refresh the standby database control file, the standby database will attempt to use the renamed datafile, but it will not find it. Consequently, you will see error messages similar to the following in the alert log:
    ORA-00283: recovery session canceled due to errors
    ORA-01157: cannot identify/lock datafile 4 - see DBWR trace file
    ORA-01110: datafile 4: '/Disk1/oracle/oradata/payroll/tbs_x.dbf'Hope That Helps.
    Ogan

  • How do i transfer all my data from one itouch to another?

    how do i transfer all my data from one itouch to another?

    Try here  >  http://support.apple.com/kb/HT2109

  • Best Way to port the data from one DB to another DB using Biztalk

    Hi,
    please suggest best way to move the data from one db to another DB using biztalk.
    Currently I am doing like that, for each transaction(getting from different source tables) through receive port, and do some mapping (some custom logic for data mapping), then insert to target normalized tables(multiple tables) and back to update the status
    of transaction in source table in sourceDB. It is processing one by one.
    How/best we we can do it using  bulk transfer and update the status. Since it has more than 10000 transaction per call.
    Thanks,
    Vinoth

    Hi Vinoth,
    For SQL Bulk inserts you can always use SQL Bulk Load
    adapter.
    http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalksyn/archive/2005/10/23/processing-a-large-flat-file-message-with-biztalk-and-the-sqlbulkinsert-adapter.aspx
    However, even though a SQL Bulk Load adapter can efficiently insert a large amount of data into SQL you are still stuck with the issues of transmitting the
    MessageBox database and the memory issues of dealing with really large messages.
    I would personally suggest you to use SSIS, as you have mentioned that records have to be processed in specific time of day as opposed to when the
    records are available.
    Please refer to this link to get more information about SSIS: http://msdn.microsoft.com/en-us/library/ms141026.aspx
    If you have any more questions related to SSIS, please ask it in
    SSIS 
    forum and you will get specific support.
    Rachit

  • How to Move or Copy the Tables from One Database to Another Database ?

    HI,
          Can any one help me on this, How i can move or copy the tables from one database to another database in SQL server 2005 by using SQL query. Hope can anyone provide me the useful and valuable response.
    Thanks
    Gopi

    Hello,
    Maybe these links help you out
    http://www.microsoft.com/downloads/en/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en
    http://www.suite101.com/content/how-to-copy-a-sql-database-a193532
    Also, you can just detach the database make a copy and move it to the new server.

  • How to copy documents for InfoProvider data from one cube to another cube

    Hello Everyone,
    We are using standard document feature to store document/comment about the data shown in the report/planning query. Relevant characteristics have the property 'characteristics is document attrib' turned on/selected for this purpose.
    Looks like the documents created gets tagged to a particular InfoProvider along with characteristic value assignment.
    Is there a way to move or copy documents from one InfoProvider to another InfoProvider.
    As per the design requirement, we need to move data from a real time InfoProvider (transaction cube) to a basic reporting cube. The data in the first/source cube stays for a period of approx 3 months before moved to other cube. We want the documents associated with InfoProvider data also to be moved, so that users can continue to see the document/comments what they  had created earlier.  
    I looked at the Documents tab in DataWarehouse workbench. No options seem to be available to copy or move documents.
    Any help will be highly appreciated and points will be rewarded accordingly!
    Best regards,
    Sanjeeb

    Hi
    Have you got any answer to this? I would also be interested in a copy function but more from one query ID to another.
    Kind regards,
    Daniel Müller

  • How to move the pages and reports from one dashboard to another

    hi all
    can please any one tel me hw to copy the reports along with pages from one dashboard to another
    Thanks

    Hi,
    Go to Administrator->Manage Presentation Catalg->Click on Group folder under which the dashboard and reports are present
    1)Create one folder and copy the reports which are present in the dashboard pages you want(reports will be under some specific folder,open and copy one after the other to the newly created folder).Do this if you want other set of same reports for new dashboard that you are creating
    2)Click on _portal and create a new folder(new dashboard)
    3)Click on dashboad that is to be copied
    4)copy the pages one after the other into new dashboard folder
    If you are not keeping new set of reports then no need to point reports in pages,if reports are placed under new folder then go to each page and pull those reports from newly created folder.
    Regards,
    Srikanth

  • Inserting data from one table into another table using PL/SQL

    HI,
    I am trying to insert values from one table into another using PL procedure, the values I want to retrieve from the table riverside1 are charac_id and charac_type and insert these values into another table called riverside2 , the stored procedure zorgs_gorfs(x,y) accepts two parameters which are 2 charac_id's of d characters in riverside1 then using insert statements inserts these characters from riverside1 into riverside2.
    CREATE OR REPLACE PROCEDURE zorgs_gorfs(x IN NUMBER, y IN NUMBER) AS
         BEGIN
              INSERT INTO riverside2
                   (charac_id)
              VALUES
                   (x);
    INSERT INTO riverside2
                   (charac_id)
              VALUES
                   (y);
          END zorgs_gorfs;
    /This works but the problem im having is that when I also try to insert the charac_type as well as the charac_id it doesnt work below is the code:
    CREATE OR REPLACE PROCEDURE zorgs_gorfs(x IN NUMBER, y IN NUMBER) AS
         BEGIN
              INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id = x);
          END zorgs_gorfs;
    /can someone kindly sort me out

    modify this sql
    INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id = x);as
    INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id in ( x,y));But my suggestion would be consider revising your approach. It does not look that good.
    Thanks,
    karthick.

  • How to transfer SOME apps + app data from one iPad to another

    I have an iPad1 that has tons of apps on it (I call it my app graveyard).
    I have an iPad2 that has my primary apps and this is the iPad that I use on a daily basis.
    I want to move an App and the Saved Data from the iPad1 to the iPad2. How do I do this?
    Again, I don't want to restore everything... just a couple of Apps + their SAVED data from my iPad1 to my iPad2.
    Any help would be greatly appreciated!

    When you restore from a backup - the process is an "all or nothing" deal. You restore all app data and settings. You cannot select just one set of app data to restore.
    You can download the one app only to the other iPad but you cannot restore the data from just one app. It's just not possible to do.

  • How can I transfer my iTunes data from one computer to another? PS. My old computer won't turn on

    I Recently bought a new computer and I need to transfer all my iTunes data from my old computer to the new one, how can I do that? And by the way, my old computer won't turn on

    Hello Nousernamebrah
    Well get get your music from your old computer to your new computer, the old computer would have to work and turn on to access the files to be copied over. You also can access any previous purchased music and download it to your new computer as well. Check out the articles below for more information. 
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/HT4527
    Download past purchases
    http://support.apple.com/kb/HT2519
    Regards,
    -Norm G.

  • Transferring data from one table to another table using a Keycolumn using SSIS row by row dynamically

    Hi All,
    I have a Store Procedure(SP) which has a output variable name "AcivityID" which is the key column. In this SP, transformation  of data is done from one table to insert data into other table. I have to execute the SP and insert row by row data
    using the output variable "ActivityID"  whose value will keep on changing. How can I do it?
    Thanks,
    Kallu

    Value changing on a row by row basis? Not quite sure what you mean, but it seems that you want to use the results of an insert into one table as input for another. If so then SSIS is not needed, inside the stored proc use the SQL that will do that and for
    all records as
    INSERT A INTO dbo.table1
    OUTPUT INSERTED.A INTO MyTable;
    Arthur My Blog

  • How to transfer app data from one mac to another without using syncing of the iphone?

    Right, recently I have tried to change which computer my Iphone syncs with so that my older mac can be sold or disposed of in some profitable form. I have successfully synced all of my music off of one mac onto another via home sharing at which point I connected my phone to my new computer which suggested that the phone needed a software update. Immediately after doing this I realised that my updated Iphone 3GS would no longer sync to my old computer and attempted to sync it just to confirm this- it failed and stated that the iphone could only sync with itunes 10.1 which is a higher spec than that mac can hold. I then feeling doubtful that things would work out tried to carry on as if this problem were absent but I later discovered that I could only transfer the apps that I had synced to my phone to my new mac and all unsynced apps appeared lost because as I stated previously I could not sync with my older mac which contains all of their data. I have consulted the online apple manual for the phone and all it states is the method of transferring purchases in itunes which I tried and is what lead to the copying of my synced apps on to my new mac. What I am asking is is their anyway that I can 'cheat' so to speak at app transfers. I know that somewhere on my old mac the files are stored with the information of the lost apps but I cannot locate them and would not know how to merge them into my newer itunes if I were to copy and paste them to a memory stick (assuming that this is the right method) Other than this is their any other way of downgrading the upgrades of an iphone or somehow tricking itunes into running a higher update than the computer spec? I've tried all I can and this is really annoying- please help!!!!!!

    I'm not entirely sure what you're asking... I'll have to look on my Mac at home to see exactly where they are, but you should just be able to copy all the apps from your old machine to thumb drive or over the network and put them in iTunes on the new one, then sync. Right click on one of the apps in your iTunes library and choose Show in Finder. That will point you to where they are.
    If you're asking how you can do this and maintain data contained 'within' the apps themselves (high scores, game progress, etc), I don't think there's any way you can do that.

  • How to move worksheet saved on database from one instance to another?

    Hi Every one,
    How to move worksheet or workbook saved on database from Discoverer plus from one instance to other instance?
    Is there any way to save a workbook or work sheet on to local drive from discoverer plus.?
    Thanks
    santhosh

    Hi,
    You have 2 options: use Discoverer Administrator to export/import the workbook; or use Discoverer Desktop to save the workbook to the local drive.
    You cannot save a workbook to the local drive using Discoverer Plus.
    Rod West

Maybe you are looking for

  • Proactive Tablespace Management in a large environment

    Hi, I was wondering how others in the community manage tablespaces proactively. In our situation we have thousands of oracle databases and are not using a primary DBA service model. We don't have DBA's looking at individual databases on a daily basis

  • Every time I want to log in to Creative Cloud I have to delete OOBE folder

    Creative Cloud app shows me just blank page with no option to log in untill I delete OOBE folder. It's this folder: C:\Users\(Your User name)\AppData\Local\Adobe\OOBE I have no idea how to permanently fix it.

  • Application Manager Failed to Update Itself

    When I booted up my Windows 7 system on Monday I was prompted to update Adobe CS6 applications. Application manager (which had been working fine since last year) failed to update itself. The Application Manager icon disappeared from my desktop and Ap

  • Windows 7 won't boot after I installed GRUB

    Hello, I just installed Arch Linux on my laptop with Windows 7. I followed the Beginners Guide. However, when I did "grub-install --target=i386-pc --recheck /dev/sda" it said something along the lines of: warning, no BIOS boot partition, embedding is

  • My .mov files from Time Machine have gone to o.o minutes.

    I have 100's of .mov files on my Time Machine backup and when I restored them, they won't play.  Basically the length shows o.o.  Is there anyway to save these files ?  I have years of vacation movies that look like they've been lost.  They won't pla