在WebForm的DataGrid的模板列中放一个DataGrid,如何使模板列中的DataGrid邦定数据集?

解决方案 »

  1.   

    string sql = "select truename from alluser where sendworkid = 24 and enabled > 0 " ;
    SqlConnection Connection = new SqlConnection(ConfigurationSettings.AppSettings["Connectionstring"]);
    SqlDataAdapter adapter = new SqlDataAdapter(sql,Connection);DataSet data = new DataSet();
    adapter.Fill(data,"alluser");ListBox1.DataSource = data;
    ListBox1.DataTextField = "truename";
    ListBox1.DataBind();
    ===========================================================
    这里有大查技术文档,源码,供大家下载,这里还有好多其它好东西
    C#写的搜索引擎源码
    网址:www.dvpx.com
      

  2.   

    TO spiderman111(www.dvpx.com):谢谢你的答复!其实我问的是有一个DataGrid1,DataGrid1有一个模板列,在这模板列中再放一个DataGrid2,DataGrid2用于显示明细记录,DataGrid1我知道如何判断邦定数据集,但DataGrid2不知如何邦定明细的数据集!这些都是ASP.NET中的