asp.net 如何实现 带分页功 能 的合并单元格显示呀
效果如下:|—————————————————————————————|
| | 收入一 |
| 项目名称 ——————————————|
| | 收入二 |
|—————————————————————————————|
| | 收入11 |
| 项目名称2 ——————————————|
| | 收入222 |
|—————————————————————————————|
首页 上一页 下一页 尾页
效果如下:|—————————————————————————————|
| | 收入一 |
| 项目名称 ——————————————|
| | 收入二 |
|—————————————————————————————|
| | 收入11 |
| 项目名称2 ——————————————|
| | 收入222 |
|—————————————————————————————|
首页 上一页 下一页 尾页
解决方案 »
- 初学者求问:gridview 中放了checkbox怎么事先删除选中的行
- SqlDataAdapter操作Gridview实现Gridview编辑状态。分不够加分
- ASP.NET中嵌入javascript时出错
- 泪求:应用dsoframer控件打开保存word文件的问题
- 请教一下简单的问题:为何标签不显示出来
- 学习ASP.NET应该买哪几本书?
- ◆◆◆Activex控件在Web中使用问题◆◆◆
- 求代码!!!急!!!!
- 大家来看看提示错误信息应该写在什么位置?????(有意思哟)
- 請問大家:可不可以在代碼中判斷一個字串是否符合正則表達式,而不使用驗証控件
- 关于wap的技术
- HTML编辑器基本功能是怎么做的
1.把aspx前台中GridView中的AllowPaging设置为true,并设置每页的分页条数。
2.点击闪电图标,找到PageIndexChanging事件并双击,添加代码,例如:GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
Bind();
}后台Bind()函数如下: SqlConnection thisConnection = new SqlConnection("Server=.;UID=sa;PWD=;DataBase=Graduation_Project");
SqlCommand sqlCommand = new SqlCommand();
sqlCommand.CommandText = @"
select
*
from
Book
";
thisConnection.Open();
sqlCommand.Connection = thisConnection;
SqlDataAdapter sda=new SqlDataAdapter(sqlCommand);
DataTable dt=new DataTable();
sda.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
thisConnection.Close();或者为: SqlConnection thisConnection = new SqlConnection("Server=.;UID=sa;PWD=;DataBase=Graduation_Project");
string sql = @"
select
*
from
Borrow
";
thisConnection.Open();
SqlDataAdapter sda=new SqlDataAdapter(sql,thisConnection);
DataSet dataSet = new DataSet();
sda.Fill(dataSet, "Borrow");
GridView1.DataSource = dataSet.Tables["Borrow"].DefaultView;
GridView1.DataBind();
thisConnection.Close();