首页 > 代码库 > GridView 行单击或双击事件绑定

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));            }        }

 

GridView 行单击或双击事件绑定