here i  give another approach

Dim table3 as DataTable = table1
Dim dvtable2 as new DataView(table2)
Dim dvtable3 as new DataView(table3)

For i as short=0 to table1.rows.count-1
   dvtable3(i)("CCode")=dvtable3(i)("CCode").tostring +
dvtable2(i)("CCode").tostring
   dvtable3(i)("Cname")=dvtable3(i)("Cname").tostring +
dvtable2(i)("Cname").tostring
   dvtable3(i)("Caddress")=dvtable3(i)("Caddress").tostring +
dvtable2(i)("Caddress").tostring
   dvtable3(i)("CPhone")=dvtable3(i)("CPhone").tostring +
dvtable2(i)("CPhone").tostring
Next
gridview1.datasource=table3
gridview1.databind()








2009/6/19 Snoopy33 <[email protected]>

>
> I have a problem that i have no idea how to approach.  I have customer
> tables in two different applications that i want to be able to pull up
> in a datagridview in the application that i'm developing.
>
> the fields in table1 are
>
> CCode, Cname, Caddress, CPhone
>
> and fields in table 2 are
> CCode, Cname, Caddress, CPhone
>
> (for our purposes, the same)
>
> I want a single datagridview with just the 4 fields from each table
> combined.  In other words, i don't want a total of 8 fields in the
> datagridview.
>
> Is there any way to accomplish this?
>
> I'm pulling the data from an SQL Database using VB.Net to develop in.
>
> Thanks for any help.
>
> Ben




-- 
Regards
*******************
*C.Arun Kumar *
*******************

Reply via email to