Display columns from different table in same datagrid

Display columns from different table in same datagrid

Post by U2l0YX » Sat, 05 Feb 2005 20:09:01


Hello,

I need to display 2 tables in the same datagrid.
I've been playing with this http://www.yqcomputer.com/
which works great except for a few things:
- I know no way to format the displayed data (I have some datetime columns)
- sorting does not work either
- I can't replace null values with what I want

I would like to avoid the hassle of merging my 2 datatables into a 3rd one
and then displaying it. Any changes in this datatable I will have to manually
update my 2 original datatables.

Eventually I have to implement this on a WinCE device so I'm also concerned
with performance issues.

This seems like a common issue (having IDs + data in one table and the
matching description + ID in another table and needing to display the
description + data itself) but I haven't found anything good but this MS
article.

Anyone has any ideas on how to achieve this?

Thanks,
Sitar.
 
 
 

Display columns from different table in same datagrid

Post by Relaxi » Fri, 04 Mar 2005 03:53:35

From your DataAdapter have it create only 1 DataTable.
i.e. DataAdpater.Fill (DataSet,"DataTableName");

This will place your resultset into 1 DataTable.

Hopefully this is what you are looking for.



columns)
manually
concerned