in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

How to Copy/Clone Rows from One TDBG to Another

Last post 01-18-2008 5:11 AM by C1_JamesS. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-06-2008 2:06 PM

    How to Copy/Clone Rows from One TDBG to Another

    VB.NET 2005 in Visual Studio 2005

     I have a Windows form with two TDB grids (TDB1, TDB2).

    TDB1 is bound to a .NET Dataset.  When a user clicks an Add button, I want to add the TDB1 selected data rows to TDB2.

    When the user dismisses the form, the rows in TDB2 will be added to an Excel spreadsheet.

    What is the best-pratice for doing this? I've read about DataViews. Can I filter the underlying dataset bound to TDB1 and use that to bind to TDB2? Or is it simple to just add the rows to TDB2 w/out data binding? I do not need to update a database, just add TDB2 rows to Excel.

    Thanks!

    Filed under: ,
  • 01-10-2008 9:14 AM In reply to

    Re: How to Copy/Clone Rows from One TDBG to Another

    If it were me, I would not bother with a 2nd grid.  I'd just write the SelectedRows in grid 1 out to Excel.

    See multi-selection in the Help File and Sample Applications. 

  • 01-18-2008 5:11 AM In reply to

    Re: How to Copy/Clone Rows from One TDBG to Another

    Hello,

    Please find attached a small sample application which should be helpful in this scenario.

    Best Regards,

    James Smith

    <cardinalone> wrote in message news:200864@10.0.1.98...

    VB.NET 2005 in Visual Studio 2005

     I have a Windows form with two TDB grids (TDB1, TDB2).

    TDB1 is bound to a .NET Dataset.  When a user clicks an Add button, I want to add the TDB1 selected data rows to TDB2.

    When the user dismisses the form, the rows in TDB2 will be added to an Excel spreadsheet.

    What is the best-pratice for doing this? I've read about DataViews. Can I filter the underlying dataset bound to TDB1 and use that to bind to TDB2? Or is it simple to just add the rows to TDB2 w/out data binding? I do not need to update a database, just add TDB2 rows to Excel.

    Thanks!



    http://helpcentral.componentone.com/cs/forums/p/73947/200864.aspx#200864

Page 1 of 1 (3 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.