随笔分类 -  GridView

两个自己写的合并GridView 行的方法
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--publicvoidMergeRow(GridViewgv,intcellNum){inti=0;introw=0;foreach(KeyValuePair<string,int>kpin... 阅读全文

posted @ 2010-12-01 15:45 AndyCai 阅读(190) 评论(0) 推荐(0)

GridView Edit 和Delete
摘要:前台: <asp:CommandField ButtonType="Image" HeaderText="Edit" EditImageUrl="~/client_support/images/edit.GIF" UpdateImageUrl ="~/client_support/images/save.gif" CancelImageUrl="~/client_support/images... 阅读全文

posted @ 2010-06-03 13:59 AndyCai 阅读(716) 评论(0) 推荐(0)

GridView RowDataBound
摘要:if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Row.RowState == DataControlRowState.Normal || e.Row.RowState == DataControlRowState.Alternate) //正常查询显示 { Label lblSite = (Label)e.Row.FindCont... 阅读全文

posted @ 2010-06-03 13:55 AndyCai 阅读(243) 评论(0) 推荐(0)

GridView 双层表头
摘要:GridView 中实现双层表头的主要思路是通过GridView 的RowCreated 方法重写表头.要实现如下: NPRB表單號&基本資料 |預計出關日期| 實際出關日期|Delay差異天數 ---------------------------------------------------------------------------------------------NPRB_... 阅读全文

posted @ 2009-12-04 11:43 AndyCai 阅读(681) 评论(0) 推荐(0)

GridView 动态生成模版列
摘要:最近项目中有用到GridView 的列是动态生成的,并且是用模版列.查找了网上的方法.作法如下:1. 写一个类.主要继承ITemplate[代码]2. GridView 模版列的添加[代码] 阅读全文

posted @ 2009-11-25 14:22 AndyCai 阅读(469) 评论(0) 推荐(0)

GridView 增加一列CheckBox 并且可以全选
摘要:这个功能很常用.GridView 中需要有一列CheckBox 可以单独选择.也可以通过列头中的CheckBox 全部选择.JS:<script language="javascript" type="text/javascript"> function SelectAll(tempControl) { //将除头模板中的其它所有的CheckBox取反 var theBox=temp... 阅读全文

posted @ 2009-10-22 10:18 AndyCai 阅读(532) 评论(0) 推荐(0)

GridView 模版列编辑状态Dropdownlist 事件
摘要:最近项目中有这样的需求,当GridView 模版列编辑时,有Dropdownlist 和Textbox.TextBox 中的值需要通过Dropdownlist 选择来动态取得。方法如下:[代码] 阅读全文

posted @ 2009-10-08 11:06 AndyCai 阅读(357) 评论(0) 推荐(0)

asp.net js 方法传参
摘要:asp.net 前台页面有Js 方法用于模态对话框页面的打开. function OpenEdit(frmWin,width,height) { var me; me = window; var returnVal = window.showModalDialog(frmWin,me,'dialogWidth='+width +'px;dialogHeight='+height+'px;h... 阅读全文

posted @ 2009-10-08 10:48 AndyCai 阅读(641) 评论(0) 推荐(0)

GridView 导出Excle
摘要:方法一:// Response.ContentEncoding = System.Text.Encoding.UTF7; // Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("NPRB.xls", System.Text.Encoding.UTF7).ToStr... 阅读全文

posted @ 2009-07-24 19:49 AndyCai 阅读(211) 评论(0) 推荐(0)

GridView 编辑和删除的实现
摘要:GridView 中最常用的编辑和实现.Aspx 前台: <asp:CommandField ButtonType ="Button" HeaderText="修改" EditText ="修改" UpdateText ="更新" CancelText = "取消" ShowEditButton ="true" /> <asp:CommandField ShowDeleteBu... 阅读全文

posted @ 2009-05-29 11:11 AndyCai 阅读(319) 评论(0) 推荐(0)

GridView 中的事件
摘要:转自网上: DataBinding 当服务器控件绑定到数据源时发生。 (从 Control 继承。) DataBound 在服务器控件绑定到数据源后发生。 (从 BaseDataBoundControl 继承。) Disposed 当从内存释放服务器控件时发生,这是请求 ASP.NET 页时服务器控件生存期的最后阶段。 (从 Control 继承。) Init 当服务器控件初始化时发生;初始... 阅读全文

posted @ 2009-05-06 15:22 AndyCai 阅读(861) 评论(0) 推荐(0)

导航