Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Tagged as

How to copy one datatable to another

, 3 Nov 2012 CPOL
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

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