可以让DataGrid帮定的 DataTable加一个空行
解决方案 »
- 一个网站的分页
- 请教System.Web.Hosting 作HTTP服务的教程或例子。
- 只允许输入逗号、句号、感叹号,并且每种符号只允许输入一次
- Email的SmtpMail.SmtpServer问题
- 页面包含多个css链接如何解决?
- 好急的问题啊,帮忙啊。
- 如何将各种类型的图片存储到sql server 数据库中并从数据库读出显示(asp.net+vb.net)
- Response.Redirect()跳转页面能否设定时间?
- 《问题解答》》》》》》如何用C# 实现显示SQL Server中特定用户的所有表名?(在线等待)
- 用ASP。NET怎么做一个服务程序呢
- 大家用过Webdiyer兄的AspNetPager的分页控件吗?
- 水晶报表设计器怎样拉宽一点
客户端脚本 怎么写啊! net_lover(孟子E章)
private ICollection CreateDataSource()
{
String connectionString ="server=(local)\\NetSDK;database=Northwind;Integrated Security=SSPI";
SqlConnection myConnection = new SqlConnection(connectionString);
String sql = "select FirstName, LastName from Employees";
SqlDataAdapter empAdapter = new SqlDataAdapter(sql,myConnection);
DataSet ds = new DataSet();
empAdapter.Fill(ds,"Employees");
int ps = empGrid.PageSize;
int te = ds.Tables["Employees"].Rows.Count;
int f=te/ps;
DataTable dt=ds.Tables["Employees"];
for(int i=0;i<ps-(te-Int32.Parse(f.ToString())*ps);i++){
DataRow r = dt.NewRow();
dt.Rows.InsertAt(r,totalEmployees);
}
totalEmployees = dt.Rows.Count;
DataView dv = new DataView(dt);
return dv;
}http://218.84.107.5/n.aspx