473,699 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4974

What I do is...

bind the Grid to a ObjectDataSourc e.

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.c om> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.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
2732
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 not the whole page, but a portion of the page. Strangely enough the URL below http://beta.asp.net/QUICKSTARTV20/aspnet/doc/ctrlref/data/gridview.aspx (VB GridView Paging and Sorting Callbacks example)
1
2942
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 when I page the GridView (the paging controllers are in the gridview's footer). The webpage doesnt scroll back to the top of the page, so when paging through the GridView the user is always looking at the last 4-5 items on the page. My current...
8
8530
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 gridview's databind method is apparently called when the page is loaded as I have no code calling the databind method. How can I keep the gridview from databinding automatically and control it myself?
8
18081
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 display data in a "GridView" which is tied to an "ObjectDataSource". In turn, this ObjectDatasource gets it's data from a strongly-typed business object within my code.
5
3001
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 list that corresponds with the number of pages, but I am unable to wire up the Selected Index Changed event. Auto PostBack is set to true and the page is posting back when the DDL is selected / chaged, but the event is never being called. Any...
3
1557
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 drop connection, dataset, datatable etc.
2
5393
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 GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Header) {
4
8825
by: Peter | last post by:
I want to call a JavaScript on PageIndexChanged event, how do I do that? Thank You Peter
0
1230
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. So that the entire resultset isn't read, but instead just enough to display the pages. The problem now is that the GridView is only displaying the 2 rows, The
9
12080
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; e.Row.Cells.Visible = false; but after that paging is not working. I tried another way by using gridview's column.Visible property but its giving error
0
8689
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9178
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9035
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7752
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6534
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2348
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.