DataSet.Merge works well.
---------------
IF you have 2 seperate tables (in your dataset) .
Like
ds.Employee
ds.Dept
-----------
It works well on one table, but you have different PK's (as mentioned)
like
ds.Employee
ds.Employee
(perhaps the first one has full time employees, and the second
one has part time employees)
EmployeeDS ds1 = new EmployeeDS();
//populate ds1 with full time emps.
EmployeeDS ds2 = new EmployeeDS();
//populate ds2 with parttime emps.
EmployeeDS dsmerged = ds1.Merge( ?? ds2 //multi overloads here) ;
...
Merging "the same rows based on the PK" is a totally different story, and
this permutation doesn't play nice.
<JoNo216@gmail.comwrote in message
news:1178914951.377442.321790@q75g2000hsh.googlegr oups.com...
Quote:
hey guys,
I'm a little new when it comes to the ASP environment, and I need a
little help...
Does anyone know how to combine two separate datatables, and get them
to display one after the other on a datagrid? I am currently trying to
use viewstate.Add, to get both of them together but that's just not
working, and I don't see a viewstate.merge or join or anything.
Has anyone ever found a way to work around this? Or is there something
I am overlooking?
>
Thanks!
>