2014年7月13日 星期日

[RESOLVED] The data source does not support server-side data paging




When is AllowPaging ="False"  work fine!



Hello,


DataReaders doesn't support pagging, why ?DataReader is forward-only. Server-side Paging needs to be able to travel the datasource both backward and forward.So dont pass cmd.ExecuteReader directly to the datasource.Instead First load the reader
result to a datatable and then pass the datatable as datasource.


DataTable dt=new DataTable();
dt.Load(cmd.ExecuteReader());

gvBuyer.DataSource=dt;
gvBuyer.DataBind();

Hope This Helps.


沒有留言:

張貼留言