Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Copy a Records and Paste Into New Record
 

Copy a Records and Paste Into New Record

Hello Everyone,

I'm using VS 2008 Pro to develop a form app for Windows XP

I have a form that is bound to data in sql server 2005.

The data on the form is displayed in detail record style.

Often whenever a user wants to create a new record, there's already an exisiting record in the database that has many of the same values as the one the user wnats to create.

So I'd like to copy the existingrecord and paste it into the new record, thereby expediting the new record creation. Is there a way to do this?

I want to put the code behind a button click event.

If any more information is needed, please let me know. Thanks.


Damon
Damonj  Monday, September 28, 2009 4:16 PM
Actually, there is an automatic way to do this. Look at the DataTable.ImportRow() method.
~~Bonnie Berent [C# MVP]

(new blog --- not many posts yet --- be patient)
geek-goddess-bonnie.blogspot.com
BonnieB  Monday, September 28, 2009 11:44 PM
Actually, there is an automatic way to do this. Look at the DataTable.ImportRow() method.
~~Bonnie Berent [C# MVP]

(new blog --- not many posts yet --- be patient)
geek-goddess-bonnie.blogspot.com
BonnieB  Monday, September 28, 2009 11:44 PM
Deboarah thanks for taking the time to answer my question.

Bonnie, I'mresearching that now. Will report back. Many thanks.
Damon
Damonj  Tuesday, September 29, 2009 2:22 PM

You can use google to search for other answers

Custom Search

More Threads

• Problem with Listbox and Menuitem !
• Binding ComboBox and DataTable including a None entry.
• Soundplayer-Problem
• DataGridView and default SortMode
• Subtotals in DataGridView
• How to turn off "AutoGenerate" of columns when a DataGridView is data-bound
• SQL DataAdapter.Update(Dataset) Method is not working
• BindingListView DataGridView slow loading
• Good practice : Using dataset with 2 tables
• Loading alternating images in a DataGridView at runtime