一种方法,改变DataGrid2的绑定数据源,类似:
Select out_id,out_name,Into_name from tabletwo,tableone where tableone.Into_id=tabletwo.IntoId

解决方案 »

  1.   

    用select 语句把它们绑定一起,
    select Out_Id,Out_Name,b.Into_Name from tableone a, tabletwo b
    where a.Into_Id=b.Into_Id
      

  2.   

    Select out_id,out_name,Into_name from tabletwo,tableone where tableone.Into_id=tabletwo.Into_Id
      

  3.   

    在select的时候可以把他们关联起来,或者使用试图也可以!
      

  4.   

    不用sql也可以,可以用tabletwo中的into_id,遍历表1中的into_id,如果相同把表1中的into_name,赋值给into_id.这样绑定到datagrid上显示出来就是名称了。不过这样确实是自己找麻烦。用sql应该很简单的!