如何在GridView的RowCommand事件中获取当前的GridViewRow
1个回答
展开全部
2.模板列里放的控件的 CommandArgument 属性设置下值 ,没设置的话好像取不到
3.前台代码(部分省略)
4.后台代码protected void GridViewIw1_RowCommand(object sender, GridViewCommandEventArgs e){if (e.CommandName == "chooseModel"){int index = Convert.ToInt32(e.CommandArgument); //行号,从上到下0,1,2,3,4
3.前台代码(部分省略)
4.后台代码protected void GridViewIw1_RowCommand(object sender, GridViewCommandEventArgs e){if (e.CommandName == "chooseModel"){int index = Convert.ToInt32(e.CommandArgument); //行号,从上到下0,1,2,3,4
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询