datagrid分页中遇到的错误!
用自动分页显示,错误如下:这主要是什么原因啊???help
“/test1”应用程序中的服务器错误。
--------------------------------------------------------------------------------
当 AllowPaging 设置为真并且选定的数据源不实现 ICollection 时,AllowCustomPaging 必须为真,并且 ID 为 DataGrid1 的 DataGrid 必须设置 VirtualItemCount。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Web.HttpException: 当 AllowPaging 设置为真并且选定的数据源不实现 ICollection 时,AllowCustomPaging 必须为真,并且 ID 为 DataGrid1 的 DataGrid 必须设置 VirtualItemCount。
源错误:
行 81: connobj.Open();
行 82: DataGrid1.DataSource=cmdobj.ExecuteReader();
行 83: DataGrid1.DataBind();
行 84: connobj.Close();
行 85: }
源文件: d:\inetpub\wwwroot\test1\index.aspx.cs 行: 83