知足常乐,享受生活

02 2006 档案

DataGrid 自定义分页导航
摘要:DataGrid 自定义分页导航 效果: 让DataGrid自己的分页实现这样的效果[1][2][3][4][5][6] private void grid_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { if(e.Item.ItemType==ListItemTy... 阅读全文
posted @ 2006-02-27 13:07 OnlyLiu
DataGrid的列操作个人总结
摘要:绑定列 显示于列页眉中的图片,此图片会取代HeaderText的文本 如果“自动创建列”为true,则绑定列先显示,接着显示自动列,而且自动生成的列不会被加入到columns集合中。 超级链接列 //打开链接打开的位置或方式 按钮列 普通按钮 // HeaderText="操作"> //列表头 选择... 阅读全文
posted @ 2006-02-27 13:05 OnlyLiu
Html常用技巧
摘要:Q:我想去掉MultiLine(多层)Textbox的滚动条,如何做?A:change its style: TextBox1.Style["overflow"] = "visible"; ..A2:textarea style="overflow-y:visible; border:0px; font-size:12px; font-family: 宋体 Fixedsys; line-heig... 阅读全文
posted @ 2006-02-27 13:04 OnlyLiu
如何取得DataGrid绑定列和模板列中的值
摘要:有的时候想取不是编辑状态的值,这个时候通常会使用模板列中放置TextBox通过e.Item.FindControl取值,有的网友问为什么取不到?这要看你前台的列怎么写的了,下面分别写出四种情况和这四种情况下面的取值方式: 1 2 3 4 5 ... 阅读全文
posted @ 2006-02-27 10:23 OnlyLiu
集各种功能于一身的DataGrid
摘要:RequiredFieldValidator控件用来校验一个输入框中是否输入了值,RegularExpressionValidator控件用来进行正则表达是的匹配。关于正则表达式的说明请参阅其他资料. 其中ControlToValidate属性就是需要校验的文本框的ID号.标签中的文本就是在校验不成功的时候显示出来的提示,Display属性则是提示信息的显示方式. DataG... 阅读全文
posted @ 2006-02-24 10:32 OnlyLiu
GridView inline Master/Detail record display
摘要:http://www.codeproject.com/aspnet/MasterDetail.asp 阅读全文
posted @ 2006-02-22 11:06 OnlyLiu
Programming Windows TCP Sockets in C++ for the Beginner
摘要:Helps programmers new to Winsock start programming TCP sockets in C++ http://www.codeproject.com/useritems/beginningtcp_cpp.asp#xx1376326xx Introduction There really is not a lot of material on this ... 阅读全文
posted @ 2006-02-22 10:55 OnlyLiu
Highlighting and selecting an item in a DataList
摘要:http://www.codeproject.com/aspnet/HighlightSelectDataList.aspThis article describes how you can easily highlight and select an item in a DataList. Introduction ASP.NET server controls provide a rich ... 阅读全文
posted @ 2006-02-22 10:46 OnlyLiu
NET程序中常用的三十三种代码
摘要:1. 打开新的窗口并传送参数: 传送参数:response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") 接收参数:string a = Request.QueryString("id");string b = Request.QueryStr... 阅读全文
posted @ 2006-02-16 11:18 OnlyLiu
onmouseOver row in datagrid
摘要:I'm using several datagrids where the user can select the row by clickinganywhere on that row. I'd like to be able to show the hand cursor whenmousing over databound rows. Does anyone know how to d... 阅读全文
posted @ 2006-02-16 11:17 OnlyLiu
在Web DataGrid中当鼠标移到某行与离开时行的颜色发生改变(结合javascript)
摘要:在head中添加javascript 代码如下: 在DataGrid的 ItemDataBound (当数据绑定时发生)事件中: private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { if(e.Item.ItemType != L... 阅读全文
posted @ 2006-02-16 11:15 OnlyLiu
常见 Datagrid 错误
摘要:原文地址:http://www.microsoft.com/china/msdn/library/dnaspp/html/aspnet-commondatagridmistakes.asp摘要:学习如何避免在使用 ASP.NET Datagrid 控件进行开发时可能发生的一些常见错误(本文包含一些指向英文站点的链接)。目录 可以使用 Datagrid 创建列表数据而没有使用 忘记在 Page_Lo... 阅读全文
posted @ 2006-02-16 10:40 OnlyLiu
Data ItemDataBound event
摘要:Practical use of the DataGrid's ItemDataBound event.http://www.codeproject.com/aspnet/ItemCreated.aspAdvanced DataGrid Formating with ItemDataBoundhttp://www.codeproject.com/aspnet/PrettyDatagrids.asp... 阅读全文
posted @ 2006-02-16 10:40 OnlyLiu
DataGrid常用的使用技巧
摘要:1.日期的显示2.传递DataGrid中的值3.在DataGrid里添加确认删除的对话框4.格式化DataGrid :将数据原中的0,1值转换成实际的文字 5.在DataGrid中选择,确认,删除多行复选框列表6.利用dropdownlist下拉列表框,显示数据库表中的某个字段 7.取得Datagrid里的checkbox返回值 8.datagrid中加入统计值 9.如何用程序隐藏和显示DataG... 阅读全文
posted @ 2006-02-16 09:38 OnlyLiu
ASP.NET中让同一个页面不同的文本框回车响应不同的事件
摘要:在ASP.NET中,如果同一页面有多个文本框,在每个文本框按“回车”按钮,将会默认响应第一个Button的Click事件,怎样能随意的按回车键而不引发意外的响应或者怎样在不同的地方按回车键得到不同的响应,这个问题曾经困扰过我很久,到目前也没有完全解决,先将目前探讨所得与大家分享,以期抛砖引玉。一、在页面任意的地方按回车键都不引发响应 如果整个页面没有需要设置回车提交的,希望在页面任意的地方按... 阅读全文
posted @ 2006-02-13 10:53 OnlyLiu
格式化日期方法
摘要:1.绑定时格式化日期方法: 2.数据控件如DataGrid/DataList等的件格式化日期方法: e.Item.Cell[0].Text = Convert.ToDateTime(e.Item.Cell[0].Text).ToShortDateString(); 3.用Strin... 阅读全文
posted @ 2006-02-03 12:29 OnlyLiu
ASP .Net数据读取
摘要:http://www.dezai.net/index/Article_Show.asp?ArticleID=4999 阅读全文
posted @ 2006-02-03 11:09 OnlyLiu
ASP.NET数据格中计算数值总和
摘要:以表格形式显示数据可以带来很多好处。在本文中,我将讲解如何使用DataGrid计算总计,这在处理数值时会经常用到。 在讨论DataGrid控制时,常常可以听到别人对此方法的嘲笑。他们常常抛弃它转而使用第三方的工具。事实上,DataGrid作为. NET Framework的核心部分,已成为我开发工具箱中极具价值的工具。 什么是总计? 在应用程序中使用Data... 阅读全文
posted @ 2006-02-03 11:01 OnlyLiu