GridView双击行弹出窗口
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双击行弹出窗口的更多相关文章
- extjs_04_grid(弹出窗口&行编辑器 CRUD数据)
1.弹出窗口(添加.删除) watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYWRhbV93enM=/font/5a6L5L2T/fontsize/400/f ...
- [转]js来弹出窗口的详细说明
1.警告对话框 <script> alert("警告文字") </script> 2.确认对话框 <script> confirm(" ...
- 在HTML网页中设置弹出窗口的办法
[1.最基本的弹出窗口代码] 其实代码非常简单: <SCRIPT LANGUAGE="javascript"> <!-- window.open ('page.h ...
- JS弹出窗口代码大全(详细整理)
1.弹启一个全屏窗口 复制代码代码如下: <html> <body http://www.jb51.net','脚本之家','fullscreen');">; < ...
- 深入浅出ExtJS 第七章 弹出窗口
7.1 Ext.MessageBox 7.1 Ext.MessageBox //Ext.MessageBox为我们提供的alert/confirm/prompt等完全可以代替浏览器原生; 7.1.1 ...
- asp .NET弹出窗口 汇总(精华,麒麟创想)
asp .NET弹出窗口 汇总(精华,麒麟创想) 注://关闭,父窗口弹出对话框,子窗口直接关闭 this.Response.Write("<script language=javas ...
- EPUB弹出窗口式脚注
网上搜到一些国学典籍的EPUB版,虽有古人的注解,但正文和注解混排在一起,当我只想迅速读正文的时候比较碍眼.于是研究了一下 EPUB3 中有关脚注(footnote)的规格定义,写了一个 Python ...
- [置顶] html学习笔记,锚点,超链接,table布局,表头,h,sub,blockquote,ul,li,ol.dl,加入收藏,打印,弹出窗口
<a name="shouye"></a> <strong>strong加粗</strong> <br> 没有加粗 &l ...
- jQuery弹出窗口完整代码
jQuery弹出窗口完整代码 效果体验:http://keleyi.com/keleyi/phtml/jqtexiao/1.htm 1 <!DOCTYPE html PUBLIC "- ...
随机推荐
- jq02--基础函数
jq是一个js函数库,主要是为事件处理特别设计的,现在我们继续学习一些jq函数. 1.jq效果: 显示与隐藏: $().hide(speed,callback) speed--"slow&q ...
- C语言-apache mod(模块开发)-采用VS2017开发实战(windows篇)
C语言-apache mod(模块开发)-采用VS2017开发实战(windows篇) 名词解释:apxs apxs is a tool for building and installing ext ...
- (转)python学习笔记4--数字类型与操作符
原文:https://blog.csdn.net/lemonwyc/article/details/37558269 1. 同时赋值(Simultaneous Assignments) python支 ...
- photoshop切图介绍 && photoshop下载与破解
第一部分:界面设置 1.点击“文件-新建”(或者ctrl+n)打开一个新建对话框.名称可随意填写.“预设”设置为自定,“宽度”一般选择1920,“单位”选为像素.“高度”可选择为2000,“单位”选为 ...
- php生成markdown格式的数据库字典
<?php /** * 生成mysql数据字典 */ //数据库配置 $config = [ 'host' => '192.168.43.134', 'user' => 'root' ...
- Fiddler Web Debugger安装后与浏览器之间的常用设置(辅助爬虫)(图文详解)
不多说,直接上干货! 怎么让我们的浏览经过代理服务呢?如下来正确设置: 这里有个经验,最好用历史低版本的火狐浏览器.比如 http://ftp.mozilla.org/pub/firefox/rele ...
- NMS—卷积神经网络
1-传统的NMS NMS,非极大值抑制,在很多计算机视觉问题中有着重要应用,尤其是目标检测领域. 以人脸检测为例,通常的流程为3步: (1)通过滑动窗口或者其它的object proposals方法产 ...
- elasticsearch插件安装之--中文分词器 ik 安装
/** * 系统环境: vm12 下的centos 7.2 * 当前安装版本: elasticsearch-2.4.0.tar.gz */ ElasticSearch中内置了许多分词器, standa ...
- java基本类型自动转换
具体自动提升类型如上图所示.其中long->float的转换一开始让我感觉有点问题,因为long是64位的,而float却是32位的. 遂找寻答案,参考博客java中long到float的自动转 ...
- 深入了解Java虚拟机(1)java内存区域与内存溢出异常
java内存区域与内存溢出异常 一.运行时数据区域 1.程序计数器:线程私有,用于存储当前所执行的指令位置 2.Java虚拟机栈:线程私有,描叙Java方法执行模型:执行方法时都会创建一个栈帧,存储局 ...