winform or webform?create a relationship between tables(0) and tables(1), and use first table's DataRow's GetChildRows Method to  retrieve the records from the second tableseehttp://www.dotnetjunkies.com/Tutorial/841522C9-FFBD-4C57-BD48-F62B55057FF3.dcik

解决方案 »

  1.   

    datagrid.datasource=dataset.table(2).defaultview
    你指定的就是第3个表!当然没有结构了!
    应该这样就有结构了!:
    DataSet ds =new DataSet();
    ds.ReadXml(@"C:\wrox\ThePhile\Config\NavMenu.xml");dataGrid1.DataSource=ds;
      

  2.   

    非常感谢思归的回复!
    我发现dataset中自动创建了一个relation,名称是case_list
    我利用该关系和getchildrows能得到我要选的行,但是请问该如何将这些返回的行集作为数据源绑定到一个datagrid?
    谢谢!
      

  3.   

    参考http://msdn.microsoft.com/msdnmag/issues/02/02/cutting/default.aspx