Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't page a Datagrid using Datareader(not Dataset)

Status
Not open for further replies.

organicg

Programmer
Oct 21, 2002
151
US
I'm surprised I haven't seen this posting before. Actually, there was one months ago but they decided to just bind a dataset to the datagrid, instead of a datareader. I do not want custom paging, I just want to use the provided paging functionality of the datagrid but the problem, according to the error, is that datareader does not implement ICollection. It instructs you to, well here's the error:
AllowCustomPaging must be true and VirtualItemCount must be set for 'this datagrid' when AllowPaging is set to true and the selected datasource does not implement ICollection.

Someone in the old post recommended trying to implement ICollection, but I have no idea how to do that. Does someone know how and if it can be done, or have another solution? Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top