Feroz Khan

Feroz Khan

  • 1.4k
  • 300
  • 92.2k

How to Merge Two Data Table in One DataTable in C#

Mar 15 2018 9:54 AM
Dear,
 
I want to Merge Two or Three DataTable in one DataTable with one Row but problem is i am trying below code for merge its working but data is coming like below.
 
dtPOS.Merge(dtTGT,false,MissingSchemaAction.Add);
dtPDA.Merge(dtIPOD,false,MissingSchemaAction.Add);
dtAll.Merge(dtPOS, false, MissingSchemaAction.Add);
dtAll.Merge(dtPDA, false, MissingSchemaAction.Add);
dtAll.AcceptChanges();
dataGridView7.DataSource = dtAll;
 
Result:
 

Answers (4)