473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

GridView Paging and non-sql datasource

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/lea...ceControl.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

Apr 27 '06 #1
2 4963

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.

..
"OJ" <of****@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
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/lea...ceControl.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

Apr 27 '06 #2
OJ
Thanks....much appreciated. I hadn't looked at caching.....

Apr 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ck388 | last post by:
For some reason when I enable the callback feature of the gridview I still get a page refresh, that is it seems like there is a postback that occurs, not a callback which is just supposed to update...
1
by: davidjgonzalez | last post by:
I have a GridView that has paging enabled. Each item (as defined in an ItemTemplate) includes several controls which have operations i would like to Atlas-enable. Everything is working well except...
8
by: AG | last post by:
ASP.NET 2.0, VS 2005 I have a gridview with paging enabled, bound to an objectdatasource. Both were dropped on to the page and configured via the wizards. Basically working as expected. The...
8
by: Greg Lyles | last post by:
Hi all, I'm trying to develop an ASP.NET 2.0 website and am running into some real problems with what I thought would be a relatively simple thing to do. In a nutshell, I'm stuck on trying to...
5
by: Andrew Robinson | last post by:
I am attempting to better automate a Pager Template within a GridView. I am succesfully skinning a Drop Down List withing my control (the DDL is added to my control). I correctly populate the item...
3
by: Toni | last post by:
In DataGrid and GridView I can't use paging and sorting. I am connected to database with code, not visual. Can I use paging and sorting if I populate data to grid with code, or I need to drag and...
2
by: gnewsgroup | last post by:
I have a GridView, in which the header of one column changes depending on the selected value of a DropDownList outside of this GridView. I did this dynamic header through protected void...
4
by: Peter | last post by:
I want to call a JavaScript on PageIndexChanged event, how do I do that? Thank You Peter
0
by: Jeff | last post by:
hi there ;) asp.net 2.0 I'm having problem with paging in GridView, I'm using custom paging. The ObjectDataSource reads in the rows needed for displaying each page as each page is selected....
9
by: ally | last post by:
Hi, I am programmatically binding gridview to a datatable. I want to hide 2 columns. I can be done by adding code in RowCreated event of gridview like e.Row.Cells.Visible = false; ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.