GridView Paging and non-sql datasource

O

OJ

Hi,
I am retrieving data from an external (www) data provider through
socket communication. I send a structured query (not SQL or XML) in the
form of a string containing tab seperated values and the external
provider returns data in the same format. I have written classes in C#
to represent the individual types of records returned, and to group
these results in to DataTable objects. This works great. The problem I
have is that when I bind the DataTable to a GridView control and enable
paging/sorting as described here....

http://www.learnasp.com/freebook/learn/cs_GridViewSortingNoDataSourceControl.aspx

.....I have to rerun the query (which can take up to 2 mins) to get the
data for each next page. This is not practical. What I would like to
know is can anyone suggest a way I can persist the entire DataTable to
allow sorting/paging without having to re-run the socket based query?

I hope I have made myself clear.

I am using VWD2005 & ASP.NET 2.0
Thanks,
Oliver
 
S

sloan

What I do is...

bind the Grid to a ObjectDataSource.

Make the data(source) of the object datasource .... a fresh or cached
version of the data. (on the first call.. its fresh.. then immediately
cached..and subsequent callls get the cached version)

http://spaces.msn.com/sholliday/ 10/24/2005

If you check the 10/24 entry, I have a object which acts an object holder
for the web environment.

You can write a method to .... GetMyData .. and it can check the
WebDataStore for a copy of the data, if its not there, then get it fresh.

..
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top