关于GridView,DataList,Repeater控件的嵌套使用。
首先,对外层进行数据的绑定,这个很简单就不多说了。
其次,就是对内层的数据控件进行绑定了,应该在外层控件的ItemDataBind事件中对其进行数据的绑定。
具体操作如下:
protected void data_bind(object sender,DataListEventArgs e)//如果外层是datalist,内层是Repeater
{
 Repeater rp=(Repeater)e.Item.FindControls("Repeater1");
 rp.DataSource=ds;
 rp.DataBind();
}
即实现了嵌套的绑定。

相关文章:

  • 2022-01-29
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2021-09-20
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-15
  • 2022-01-17
  • 2022-12-23
  • 2021-09-03
  • 2021-11-17
  • 2022-12-23
相关资源
相似解决方案