datagrid 分页问题!在线等解决以后马上给分
我的分页点了以后不管用。不显示下一页。还在本页。
代码如下:
BindGrid类代码:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
/// <summary>
/// BindGrid 的摘要说明
/// </summary>
public class BindGrid
{
public SqlConnection con;
public SqlDataAdapter sda;
public DataSet ds;
//public BindGrid(string sql_select)
//{
// con = new SqlConnection(ConfigurationSettings.AppSettings[ "Str_sql "]);
// con.Open();
// sda = new SqlDataAdapter(sql_select, con);
// ds = new DataSet();
// sda.Fill(ds);
// //
// // TODO: 在此处添加构造函数逻辑
// //
//}
public BindGrid()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public void Opencon(string sql_select)
{
con = new SqlConnection(ConfigurationSettings.AppSettings[ "Str_sql "]);
con.Open();
sda = new SqlDataAdapter(sql_select, con);
BindGrid1(sda);
}
public void BindGrid1(SqlDataAdapter sda)
{
ds = new DataSet();
sda.Fill(ds);
}
public void NextGrid1(DataSet ds)
{
}
}
cs代码:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System