62,072
社区成员
发帖
与我相关
我的任务
分享
GridView gv=(GridView)DataList1.Items[x].FindControl("GridView1");
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lb = (Label)e.Row.Cells[2].FindControl("Label2");
}
}
protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
GridView gv1=(GridView)e.Item.FindControl("GridView1");
gv1.DataSource=“你要绑定的数据源”;
gv1.DataBind;
//这是DataList的OnItemDataBound事件
}