ASP .NET ObjectDataSource requires List<T>, not IList<T> for paging.

J

jehugaleahsa

Hello:

I have a custom collection class specifically meant for handling
business objects. I tried to bind my ObjectDataSource through my
collection and it allows it since it implements from IList<T>.

However, when I went to load the page it threw an error saying that my
data source (my collection) doesn't support paging. I was a little
confused.

Does ObjectDataSource require List<T> explicitly as one of the valid
collections it can page with? or is there something about List<T> that
makes it paging-friendly?

If I can't get my custom collection to page, I feel like there is a
limitation. I mean, I can always put my business objects into a
List<T>, but that means more code and less clarity (and coworkers
complaining).

Thanks,
Travis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top