gridview
奈落不死
这个作者很懒,什么都没留下…
展开
-
鼠标移到GridView某一行时改变该行的背景色方法:
双击GridView的OnRowDataBound事件; 在后台的GridView1_RowDataBound()方法添加代码,最后代码如下所示: protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { int i; //执行循环,保证每条数据都可转载 2013-05-13 14:55:07 · 288 阅读 · 0 评论 -
GridView实现用“...”代替超长字符串:
public string SubStr(string sString, int nLeng) { if (sString.Length { return sString; } string sNewStr = sString.Substring(0, nLeng); s原创 2013-05-13 15:28:42 · 210 阅读 · 0 评论 -
gridview固定表头
.Freezing { position:relative ; table-layout:fixed; top:expression(this.offsetParent.scrollTop); z-index: 10; } .Freezing th{text-overflow:ellipsis;overflow:hid原创 2013-05-13 16:01:45 · 225 阅读 · 0 评论 -
gridview第一列显示编号
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { //下面的代码可以写在GridView1_RowCreated中原创 2014-02-10 09:26:34 · 230 阅读 · 0 评论 -
gridview双击行跳转事件
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { //如果是绑定数据行 if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attr原创 2014-02-18 10:19:02 · 260 阅读 · 0 评论