Repeater两层嵌套和三层嵌套repeater1_ItemDataBound绑定
两层嵌套
protected void rpt_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater rpt = (Repeater)e.Item.FindControl(&"rpt_Level04&");
int typeFatherID = ((CommonType)e.Item.DataItem).TypeID;
rpt.DataSource = da.GetAllNodeInfo(tt, typeFatherID);
rpt.DataBind();
}
}
三层嵌套
protected void rpt_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater rpt = (Repeater)e.Item.FindControl(&"rpt_Level04&");
int typeFatherID = ((CommonType)e.Item.DataItem).TypeID;
rpt.DataSource = da.GetAllNodeInfo(tt, typeFatherID);
rpt.DataBind();
}
}
protected void rpt_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater rpt = (Repeater)e.Item.FindControl(&"rpt_Level04&");
int typeFatherID = ((CommonType)e.Item.DataItem).TypeID;
rpt.DataSource = da.GetAllNodeInfo(tt, typeFatherID);
rpt.DataBind();
}
}
三层嵌套
protected void rpt_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater rpt = (Repeater)e.Item.FindControl(&"rpt_Level04&");
int typeFatherID = ((CommonType)e.Item.DataItem).TypeID;
rpt.DataSource = da.GetAllNodeInfo(tt, typeFatherID);
rpt.DataBind();
}
}