日期:2014-05-17 浏览次数:20456 次
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item
------解决方案--------------------
e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater repeater2 = e.Item.FindControl("Repeater2") as Repeater;
DataRowView rowv = (DataRowView)e.Item.DataItem;
string sfzh = Convert.ToString(rowv["sfzh"]);
DataRow[] rows = GetData().Tables[1].Select("sfzh='" + sfzh + "'");
DataTable dt = GetData().Tables[1].Clone();
foreach (DataRow dr in rows)
{
dt.ImportRow(dr);
}
repeater2.DataSource = dt;
repeater2.DataBind();
}
}