Adding Records to DataTable/Combining two tables/Take Data from DGrid to DTable

R

Ron

Forgive me if this is long...

I need to know how to add new rows to a dataTable or
combine the data of two tables(with the same format). I'll
explain the situation so you know what I'm talking about
more thoroughly.

I've got a page where you add users to a DataGrid. The
users are added to the DataGrid via an ArrayList.(I didn't
write this part) You can't sort an ArrayList, but you can
sort a DataView. So what I've done is created a table at
the same time the arraylist is created with the same data.
I pass that table to the sort function. At this point the
sort works fine. The problem arrises when you add more
users to the table. The users add to the table fine, but
when you go to sort the table, it's only sorting the new
users that I just added. This is because I can't figure
out how to add the new rows of the table, to the old rows
in the Sort Function. I've tried to use the .GetChanges()
method but that only gives me the new records. I want them
all. Got it?

Another way I could do it is to just pull the data from
the DataGrid back into a table. This might be easier, but
I have no idea if it's possible. Any ideas?

Thanks for the help! (or atleast looking)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top