gridview中通过鼠标双击事件
怎么样在后台获取鼠标双击事件当前选中的行的数据

解决方案 »

  1.   

    发这么多,在RowCommand事件里操作,参考一下:
        protected void grdColor_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int id = Convert.ToInt32(e.CommandArgument);
            AdminPCAccess pAccess = new AdminPCAccess();
            switch (e.CommandName)
            {
                case "del":
                    pAccess.DeleteColor(id);
                    break;
                case "modi":
                    pAccess.UpdateColor(hidName.Value, id);
                    break;
            }
            grdColor.DataSource = pAccess.GetAllColor();
            grdColor.DataBind();
        }