如提··········
绑定之后还可以 有 编辑删除 功能吗?
SqlDataReader reader=cmd.ExecuteReader();
cn.Close();
DataGrid3.DataSource=reader; DataGrid3.DataBind();
这样 为什么不对········
绑定之后还可以 有 编辑删除 功能吗?
SqlDataReader reader=cmd.ExecuteReader();
cn.Close();
DataGrid3.DataSource=reader; DataGrid3.DataBind();
这样 为什么不对········
当 AllowPaging 设置为真并且选定的数据源不实现 ICollection 时,AllowCustomPaging 必须为真,并且 ID 为 DataGrid3 的 DataGrid 必须设置 VirtualItemCount。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Web.HttpException: 当 AllowPaging 设置为真并且选定的数据源不实现 ICollection 时,AllowCustomPaging 必须为真,并且 ID 为 DataGrid3 的 DataGrid 必须设置 VirtualItemCount。
while(reader.Read())
DataGrid3.DataSource=reader; DataGrid3.DataBind();
cn.Close();
DataSet ds=new DataSet();
reader.Fill(ds);
DataGrid3.DataSource=ds;DataGrid3.DataMember="表名";DataGrid3.DataBind();
while(reader.Read())
DataGrid3.DataSource=reader; DataGrid3.DataBind();
cn.Close();
这个不对··· 不知道怎么回事··
Teng_s2000()
不对,你方法是正确的,可能是连接时候的错误
写拉这步吗