李晓亮的博客

导航

随笔分类 -  Asp.net之GridView

收集介绍GridView的技巧的文章
【转】通过在RowDataBound事件中把行索引绑定到控件的CommandArgument,然后在RowCommand事件中取出
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--protectedvoidGridView1_RowCommand(objectsender,GridViewCommandEventArgse){introwIndex=-1;GridViewRowrow=null;switch(e.CommandName){case"Command1"://模板列//对于模板列内的按钮,我们需要显示绑定行索引到按钮的CommandArgument属性//以获取 阅读全文

posted @ 2010-12-07 01:00 LeeXiaoLiang 阅读(303) 评论(0) 推荐(0)

【转】GridView的RowCommand事件中取得行索引
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-- protectedvoidGridView1_RowDataBound(objectsender,GridViewRowEventArgse) {if(e.Row.RowType==DataControlRowType.DataRow)//如果是为数据行{ImageButtonimgbtnup=(ImageButton)e.Row.Cells[1].FindControl("btnMoveUp" 阅读全文

posted @ 2010-12-07 00:45 LeeXiaoLiang 阅读(213) 评论(0) 推荐(0)

【转】GridView 实现服务器端和客户端全选的两种方法
摘要:代码很简单,这里就不累述了。看代码如下:例子C# GridView 实现服务器端和客户端全选的两种方法 全选 阅读全文

posted @ 2010-12-04 20:17 LeeXiaoLiang

ASP.NET之GridView数据绑定
摘要:1.模板列的绑定(1)在前台页面绑定 <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("数据库字段")%'></asp:TextBox> </ItemTemplate> </asp:Temp... 阅读全文

posted @ 2010-12-04 01:15 LeeXiaoLiang 阅读(441) 评论(0) 推荐(0)

【转】海量数据库的查询优化及分页算法方案
摘要:转自:http://dev.csdn.net/article/43/43936.shtm随着“金盾工程”建设的逐步深入和公安信息化的高速发展,公安计算机应用系统被广泛应用在各警种、各部门。与此同时,应用系统体系的核心、系统数据的存放地――数据库也随着实际应用而急剧膨胀,一些大规模的系统,如人口系统的数据甚至超过了1000万条,可谓海量。那么,如何实现... 阅读全文

posted @ 2009-06-25 02:03 LeeXiaoLiang 阅读(241) 评论(0) 推荐(0)

【转】GridView 使用技巧
摘要:本文转自CSDN博客:http://blog.csdn.net/yyldir/archive/2009/05/10/4164695.aspx1.GridView中使用超链接的技巧 GridView中的超级链接,可以设置一个模版列,放入超级链接的控件,设置绑定参数即可。数据绑定方式有两种,如下示例:◆Eval方式 <%# Eval("id") %>◆Bind方式 ... 阅读全文

posted @ 2009-06-25 01:24 LeeXiaoLiang 阅读(258) 评论(0) 推荐(0)

【转】分页类(1)
摘要:本文转自:http://topic.csdn.net/u/20090303/23/16ea3c41-51dc-4ec2-a40a-b1c315fecf15.html用sql语句分页,下面是sql语句分页类 using System; using System.Collections.Generic; using System.Text; namespace web { public class P... 阅读全文

posted @ 2009-06-25 00:00 LeeXiaoLiang 阅读(239) 评论(0) 推荐(0)

【转】用GridView编辑更新独立的单元格
摘要:本文转自:http://www.e-dragon.com.cn/HTML/DEMO_NET/Info/20071217131854Q3H927WWT3.shtml 翻译出处:http://www.codeproject.com/KB/webforms/EditGridviewCells.aspx 源代码:http://www.codeproject.com/KB/webforms/EditGrid... 阅读全文

posted @ 2008-03-19 20:12 LeeXiaoLiang 阅读(1668) 评论(0) 推荐(0)