李晓亮的博客

导航

2010年12月7日

【转】通过在RowDataBound事件中把行索引绑定到控件的CommandArgument,然后在RowCommand事件中取出

摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--protectedvoidGridView1_RowCommand(objectsender,GridViewCommandEventArgse){introwIndex=-1;GridViewRowrow=null;switch(e.CommandName){case"Command1"://模板列//对于模板列内的按钮,我们需要显示绑定行索引到按钮的CommandArgument属性//以获取 阅读全文

posted @ 2010-12-07 01:00 LeeXiaoLiang 阅读(294) 评论(0) 推荐(0) 编辑

【转】GridView的RowCommand事件中取得行索引

摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-- protectedvoidGridView1_RowDataBound(objectsender,GridViewRowEventArgse) {if(e.Row.RowType==DataControlRowType.DataRow)//如果是为数据行{ImageButtonimgbtnup=(ImageButton)e.Row.Cells[1].FindControl("btnMoveUp" 阅读全文

posted @ 2010-12-07 00:45 LeeXiaoLiang 阅读(203) 评论(0) 推荐(0) 编辑