加上鼠标点击选择(其实只是点击后变个颜色,“选择”这个词在这里不合适),顺便把这个直接应用到GridView上,如果是其他的控件,或者直接的HTML,稍加修改也可以用上,这里仅提供一个思路。虽然GridView使用AlternatingRowStyle提供了交替行背景色的问题,但这个东西用着实在不爽,看它生成到HTML的那个table,那叫一个乱啊。下面是代码,注释应该还算比较详细,比较适合初学者,可以把下面两个文件的代码直接复制到你的项目中直接执行。最下面有文件的下载地址,也可以直接下载后运行,代码在IE7,IE8,Firefox2,Firefox3下测试通过,有任何问题,请在下面留言,我将...
http://www.jb51.net//article/15640.htm
#region DataGridView数据显示到Excel /// <summary> /// 打开Excel并将DataGridView控件中数据导出到Excel /// </summary> /// <param name="dgv">DataGridView对象 </param>  ...
http://www.jb51.net//article/15428.htm
有个需求,一直没有解决,在google上找了半天,给出的方案没有一个能用了,最后鬼使神差搞定了。 是这样的,假设一个表:id f_id value 1 2 a 2 2 &...
http://www.jb51.net//article/15328.htm
顺便,把我研究过的,如何隐藏、显示一列的方法也实现了一把。但是这个功能和 css border-collapse:collapse; 有冲突,详情见代码2[html]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1...
http://www.jb51.net//article/15182.htm
ff下面[code]background-image:url("main_bg.gif"); background-repeat: repeat-y; [/code]必须指定height才能显示但是,大多数情况下都是动态高度于是设置下面的即可[code]overflow:auto; [/code]...
http://www.jb51.net//article/15082.htm
<asp:BoundField DataField="Comments" HeaderText="评论"><ItemStyle width="300px" /></asp:BoundField>...
http://www.jb51.net//article/15043.htm
book_admin.aspx[code]<asp:GridView ID="grwBook" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateColumns="false" AllowPaging="true" DataKeyNames="ID" OnPageIndexChanging="grwBook_PageIndexChanging" PageSize="12">&...
http://www.jb51.net//article/15041.htm
今天遇到这个问题,网上查了下资料,这么解决:protected void Page_Load(object sender, EventArgs e){ //正常换行 GridView1.Attributes.Add("style", "word-break:keep-all;word-wrap:normal"); //下面这行是自动换行 GridView...
http://www.jb51.net//article/15040.htm
下面用一些比较常用的属性来做示例。 margin margin-top:1px; margin-right:1px; margin-bottom:1px; margin-left:1px; 代码简化为:margin:1px margin-top:1px; margin-right:2px; margin-bottom:1px; margin-left:2px; 代码简化为:margin:1px 2px margin-top...
http://www.jb51.net//article/14822.htm
我想用这个,很不幸SQLite没有。。http://www.sqlite.org/omitted.html被omitted了!!!!!!!!!!!!![code]SELECT * FROM A RIGHT JOIN B WHERE A.id = B.id ; [/code]于是用这个先暂时代替好了。。。[code]SELECT&nbs...
http://www.jb51.net//article/14762.htm
On Error Resume NextSet WSHShell=WScript.CreateObject("WScript.Shell")With WScript.CreateObject("WScript.Shell").RegDelete"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools".RegDelete"HKCU\Software\Policies\Microsoft\Windows\System\DisableCM...
http://www.jb51.net//article/14640.htm
