Gridview

 

Introduction

  Using Javascript's cloneNode ,we can clone a table's header,so we can make a gridview to be scrollable.This method isn't set some long css.

  In asp.net 2.0's Page_Load event,we must add style for GridView, and this MUST for IE and Firefox can work!

  protected void Page_Load( object sender, EventArgs e )
  {
    if (!IsPostBack)
    {
      GridView1.Attributes.Add("style", "table-layout:fixed");
      GridView1.DataSource = CreateDataSource();
      GridView1.DataBind();
    }
  }

 Next,we must add some javascript for it:

function start()
{
 var t = document.getElementById("<%=GridView1.ClientID%>");
 var t2 = t.cloneNode(true)
 for(i = t2.rows.length -1;i > 0;i--)
 t2.deleteRow(i)  
 t.deleteRow(0)  
 a.appendChild(t2) 
}
window.onload = start
http://www.codeproject.com/KB/aspnet/ScrollingGridView.aspx
 
 
How to create custom bound fields in GridView
http://www.codeproject.com/KB/aspnet/How_to_create_custom_boun.aspx
An ASP.NET DataGrid with AutoFilter
http://www.codeproject.com/KB/aspnet/DataGridAF.aspx
Gridview with a single ModalPopupExtender/Panel for row editing
http://www.codeproject.com/KB/aspnet/GridView-ModalPopupExtend.aspx
Popup window for the GridView
http://www.codeproject.com/KB/aspnet/gridview_popup.aspx
 
C# class library for exporting data to CSV/Excel file
http://www.codeproject.com/KB/aspnet/ExportClassLibrary.aspx
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值