dataSet是一个断开的数据集,你需要重新连接,重新绑定的~~
点分页的时候也 是要有代码写过的,你我Try again!
点分页的时候也 是要有代码写过的,你我Try again!
解决方案 »
- C#编辑嵌入的资源,操作XML文件并保存
- C#如何获得鼠标在屏幕上的位置绝对坐标x,y
- 请问QQ聊天界面的字体和表情是用什么控件来做的。。
- 求微积分的源代码(最好是C#的),急!
- 目录权限问题
- web编程中,好像没有跳出框信息提示啊??MessageBox(..)。比如用户要删除一个记录,要询问它一下,咋办?总得跳出个框来啊?
- 关于TcpListner和TcpClient的问题
- 急死我了,C#中 File.Copy把本机excel文件传到局域网的另一台电脑上,老是报错,求助!
- 怎样把文本文件中的数据倒入 winform的datagrid中
- 在C#中如何实现两张图片合并?
- 当本机访问任一IP地址时,会触发什么事件,如何获取?MS Expert & Guru are welcome
- 怎样将web窗体的datagrid控件中的某一列设置为ComboBox?
{
if (IsPostBack)
{
DataSet dataSet11=new DataSet();
sqlDataAdapter1.SelectCommand.CommandText="select * from titles where type='"+DropDownList1.SelectedItem.Text+"'";
sqlDataAdapter1.Fill(dataSet11);
DataGrid1.DataSource=dataSet11;
DataGrid1.DataBind();
}
}
private void DataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
DataGrid1.CurrentPageIndex=e.NewPageIndex;
DataGrid1.DataBind();
}
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
DataGrid1.CurrentPageIndex=0;
DataGrid1.DataBind();
}