GridView and ObjectDataSource Sorting

  • Thread starter Thread starter Guest
  • Start date Start date
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 :o)
 
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...
 
Back
Top