5 pts.
 Add a row from DataTable to second DatTable
Hello, I have a DataTable that gets new data in loop, each time the data is changed I want to enter the new row to second DataTable (that in the end of the loop will contain the whole data). Here is my code and my problem is in the end: //ReminderDetail - the DataTable that is changed in loop //RemindersForNow - the DataTable that should get the new row from ReminderDetail ReminderDetail = Program.aHelper.LoadRemindersOfHousesForRentPerREMINDERID(Convert.ToInt16(ArrayRemindersForNow.Rows[i]["ReminderID">)); //Add the HouseForTable if (ReminderDetail.Rows.Count > 0) { RemindersForNow = ReminderDetail.Clone(); foreach (DataRow dr in ReminderDetail.Rows) { RemindersForNow.ImportRow(dr); } } My problem is: if I wrote the row of: RemindersForNow = ReminderDetail.Clone(); in the main loop of the ReminderDetail loop - the second DataTable become RemindersForNow .Rows.Count = 0; but if I don't write that line, the loop works fine and i see that the rows enter to RemindersForNow DataTable; RemindersForNow .Rows.Count = 1 and after that 2 etc. but RemindersForNow .Columns.Count = 0!!!!! instead of 75 columns. Can you help me?

Software/Hardware used:
ASKED: June 10, 2009  5:05 PM
UPDATED: June 10, 2009  5:28 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _