GRIDVIEW单击双击事件

protected void gvTeacherTaskList_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "ShowDetail")
            { 
            
            }
        }

        protected void gvTeacherTaskList_DataBound(object sender, EventArgs e)
        {
            foreach (GridViewRow row in gvTeacherTaskList.Rows)
            {
                var btnShowDetail = row.FindControl("btnShowDetail") as Button;
                row.Attributes.Add("ondblclick", ClientScript.GetPostBackEventReference(btnShowDetail, null));
            }
        }
posted @ 2020-01-07 23:21  厦门哈韩  阅读(209)  评论(0编辑  收藏  举报