protected void gvCustom_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#ccddee'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
//设置悬浮鼠标指针形状为"小手"
e.Row.Attributes["style"] = "Cursor:hand"; ImageButton imgFlag = new ImageButton();
imgFlag = ((ImageButton)e.Row.Cells[].Controls[]);
if (imgFlag.AlternateText == "删除")
{
imgFlag.Attributes.Add("onclick", "javascript:return confirm('您确信要删除:/"" +e.Row.Cells[1].Text+"/" 吗?')"); //Button btn = (Button)e.Row.Cells[5].Controls[0];
//btn.Attributes.Add("onclick", "javascript:return confirm('你确认要删除:/"" + e.Row.Cells[1].Text + "/"吗?')"); //Button1.Attributes.Add("onclick","return confirm(’确认?’)");
//button.attributes.add("onclick","if(confirm(’are you sure?’)){return true;}else{return false;}")
}
//设置弹出窗体
//string CustomID= gvCustom.DataKeys[ e.Row.RowIndex]["CustomID"].ToString() ;
//e.Row.Attributes.Add("ondblclick", "javascript:window.showModalDialog('./CustomInfo.aspx?CustomID=" + CustomID + "',window,'scroll:no;status:no;center:yes;dialogHeight:480px;dialogWidth:700px;');");
}
}

protected void gvCustom_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#ccddee'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
            //设置悬浮鼠标指针形状为"小手"   
            e.Row.Attributes["style"] = "Cursor:hand";

ImageButton imgFlag = new ImageButton();
            imgFlag = ((ImageButton)e.Row.Cells[].Controls[]);
            if (imgFlag.AlternateText == "删除")
            {
                imgFlag.Attributes.Add("onclick", "javascript:return confirm('您确信要删除:/"" +e.Row.Cells[1].Text+"/" 吗?')");

//Button btn = (Button)e.Row.Cells[5].Controls[0];
                //btn.Attributes.Add("onclick", "javascript:return confirm('你确认要删除:/"" + e.Row.Cells[1].Text + "/"吗?')");

//Button1.Attributes.Add("onclick","return confirm(’确认?’)");
                //button.attributes.add("onclick","if(confirm(’are you sure?’)){return true;}else{return false;}") 
            }
            //设置弹出窗体
            //string CustomID= gvCustom.DataKeys[ e.Row.RowIndex]["CustomID"].ToString() ;
            //e.Row.Attributes.Add("ondblclick", "javascript:window.showModalDialog('./CustomInfo.aspx?CustomID=" + CustomID + "',window,'scroll:no;status:no;center:yes;dialogHeight:480px;dialogWidth:700px;');");
        }
    }

GridView双击行弹出窗口的更多相关文章

  1. extjs_04_grid(弹出窗口&行编辑器 CRUD数据)

    1.弹出窗口(添加.删除) watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYWRhbV93enM=/font/5a6L5L2T/fontsize/400/f ...

  2. [转]js来弹出窗口的详细说明

    1.警告对话框 <script> alert("警告文字") </script> 2.确认对话框 <script> confirm(" ...

  3. 在HTML网页中设置弹出窗口的办法

    [1.最基本的弹出窗口代码] 其实代码非常简单: <SCRIPT LANGUAGE="javascript"> <!-- window.open ('page.h ...

  4. JS弹出窗口代码大全(详细整理)

    1.弹启一个全屏窗口 复制代码代码如下: <html> <body http://www.jb51.net','脚本之家','fullscreen');">; < ...

  5. 深入浅出ExtJS 第七章 弹出窗口

    7.1 Ext.MessageBox 7.1 Ext.MessageBox //Ext.MessageBox为我们提供的alert/confirm/prompt等完全可以代替浏览器原生; 7.1.1 ...

  6. asp .NET弹出窗口 汇总(精华,麒麟创想)

    asp .NET弹出窗口 汇总(精华,麒麟创想) 注://关闭,父窗口弹出对话框,子窗口直接关闭 this.Response.Write("<script language=javas ...

  7. EPUB弹出窗口式脚注

    网上搜到一些国学典籍的EPUB版,虽有古人的注解,但正文和注解混排在一起,当我只想迅速读正文的时候比较碍眼.于是研究了一下 EPUB3 中有关脚注(footnote)的规格定义,写了一个 Python ...

  8. [置顶] html学习笔记,锚点,超链接,table布局,表头,h,sub,blockquote,ul,li,ol.dl,加入收藏,打印,弹出窗口

    <a name="shouye"></a> <strong>strong加粗</strong> <br> 没有加粗 &l ...

  9. jQuery弹出窗口完整代码

    jQuery弹出窗口完整代码 效果体验:http://keleyi.com/keleyi/phtml/jqtexiao/1.htm 1 <!DOCTYPE html PUBLIC "- ...

随机推荐

  1. POJ 1083

    #include<iostream> #include<stdio.h> #include<algorithm> #define MAXN 400 using na ...

  2. Visual Studio和eclipse的大小写转换快捷键

    Visual Studio: 转小写:ctrl + u 转大写:  ctrl + shift + u eclipse: 转小写:  ctrl + shift + y 转大写:  ctrl + shif ...

  3. Python中第三方库的安装

    网上的帖子挺多的,教你如何安装,安装第三方工具库的方法总共分为三类:Dos系统下pip命令:安装包下载安装:IDE集成环境下安装(Pycharm,Spyder……) http://www.jiansh ...

  4. Python生成gexf文件并导入gephi做网络图分析

    Gephi是一款优秀的复杂网络分析软件,支持导入多种格式的文件.gexf格式是Gephi 推荐的格式,基于 XML.本文是一个用python写的简单Demo,示例如何生成一个典型的gexf格式文件.代 ...

  5. android Butter Knife 使用详解

    Butter Knife github连接:https://github.com/JakeWharton/butterknife 本文使用的butterknife版本7.0.1 butterknife ...

  6. PL/SQL developer 出现无效的SQL语句的解决

    这里要说的SQL语句本身没有错误,但是PL/SQL developer 出现无效的SQL语句的解决. 出现这个提示是因为下面的这句代码: --变量num:是一个地址值,在该地址上保存了输入的值 acc ...

  7. openTSDB(转)

    1.OpenTSDB介绍 1.1.OpenTSDB是什么?主要用途是什么? 官方文档这样描述:OpenTSDB is a distributed, scalable Time Series Datab ...

  8. Tomcat,JBoss与JBoss Web

    最近接触到应用服务器JBoss,此外JBoss Web与Tomcat也同为web服务器,便查阅资料对三者进行比较,供大家参考. 一.Tomcat Tomcat 服务器是免费开源的Web 应用服务器.支 ...

  9. jquery.dataTables动态列--转

    转自 https://www.cnblogs.com/lyeo/p/4765514.html jquery.dataTables  版本1.10.7 直接上代码: 0.table <table ...

  10. Automapper问题记录

    在Automapper使用中会碰到一些未能映射或者错误的问题,这些问题可能会经常忘记如何处理,想到一些就记录一些: 映射值有时为空又不报错的情况 这很可能是由于目标类中的部分属性有问题导致的,最简单的 ...