datalist问题,求教大家
我新建了datalist控件datalist1,我想在datalist1中嵌入一个datalist2,我想求教如何绑定datalist2的数据源,谢谢大家了
------解决方案--------------------DataList1的ItemDataBound事件中:
DataList dlst2 = (DataList)e.Item.FindControl( "dlst2 ");
dlst2.DataSource = ...;
dlst2.DataBind();
------解决方案--------------------DataList dts= (DataList)e.Item.FindControl( "DataList2 ");
dts.DataSource =... 根据.DataGrid1.DataKeys[e.Item.ItemIndex]获取dts数据
dts.DataBind();
------解决方案--------------------帮顶下
------解决方案--------------------DataList1的ItemDataBound事件中:
DataList dlst2 = (DataList)e.Item.FindControl( "dlst2 ");
dlst2.DataSource = ...;
dlst2.DataBind();
------解决方案--------------------DataList1的ItemDataBound事件中:
DataList dlst2 = (DataList)e.Item.FindControl( "dlst2 ");
dlst2.DataSource = ...;
dlst2.DataBind();
------解决方案--------------------DataList1的ItemCreate事件中:
DataList dlst2 = (DataList)e.Item.FindControl( "dlst2 ");
dlst2.DataSource = ...;
dlst2.DataBind();