GridView and ObjectDataSource Sorting

G

Guest

Hi,

I have an ObjectDataSource bind to a GridView and Sorting is enabled.

I have no problem with sorting, I implemented IComparer but I don't want to
fetch my data each time from my database. I'm new with web development so I
don't know if I do it right.

What I do right now is putting my object in Cache, when the user sort the
data, I retrieve my object from the cache and do the sort on the object.

It working well right now but I'm the only one to test the site.

My question is, using the Cache is it the good thing to do. It is per user
request and I'm not sure that Cache is for only one user...

Help me please, I will send you a real tasty Canadian Beer :eek:)
 
G

Guest

The data source 'ObjectDataSource2' does not support sorting with IEnumerable
data. Automatic sorting is only supported with DataView, DataTable, and
DataSet

This is what happen when I turn EnableCache when I work with custom object...
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top