DataList控件嵌套GridView控件问题
设何设置嵌套在DataList控件中的GridView控件数据源?我的代码如下: Operationoperation=newOpera...
设何设置嵌套在DataList控件中的GridView控件数据源?我的代码如下: Operation operation = new Operation(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { dl_LeftLayout.DataSource = operation.IndexLeftLayout(); dl_LeftLayout.DataBind(); } } protected void dl_LeftLayout_ItemDataBound(object sender, DataListItemEventArgs e) { GridView gv_LeftList; gv_LeftList = (GridView)(e.Item.FindControl("gv_LeftList")); gv_LeftList.DataSource = operation.IndexLeftList(); gv_LeftList.DataBind(); }运行后一直报错 "GridView”并不包含“DataSource”的定义"请问是什么地方出问题了?
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询