Click here to Skip to main content
11,645,889 members (77,735 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

How to copy one datatable to another

, 2 Nov 2012 CPOL 0
You may use this code for your task. DataTable dtTarget = new DataTable(); dtTarget = dtSource.Clone(); DataRow[] rowsToCopy; rowsToCopy = dtSource.Select("key='" + matchString + "'"); foreach (DataRow temp in rowsToCopy) { dtTarget.ImportRow(temp); }

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 3-Nov-12 5:09 Available AshishChaudha
Updates in content.
1 No 3-Nov-12 3:08 Available subhajit Giri

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Asp.Net Developer

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150731.1 | Last Updated 3 Nov 2012
Article Copyright 2012 by subhajit Giri
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid