January 15th, 2014, 05:47 PM
Can't add DataRow to DataTable
I'm having trouble adding a DataRow to a DataTable.
I create the DataRow like so:
DataRow row = myDataTable.NewRow();
I add things to the row, then I try to add the row back to the table:
It tells me: "This row already belongs to this table."
Ironically, if I try:
it tells me: "Cannot perform this operation on a row not in the table."
so is it in the table or is it not?
myDataTable.AcceptChanges() seems to run without any exceptions, but my table is still empty.
January 16th, 2014, 03:18 PM
Re: Can't add DataRow to DataTable
Please share the code that updates the columns within the row with data.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!