472,805 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Gridview, using Callbacks when Sorting and Paging

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/as.../gridview.aspx

(VB GridView Paging and Sorting Callbacks example)

has a callback example for gridview which explains that there should
NOT be a page refresh, but it sure seems like the page refreshes
(flickers) when I run the example.

Also another example I found on the web on msdn

http://msdn.microsoft.com/library/de...GrdDetView.asp
(Listing 4. Using Callbacks when Sorting and Paging section)

states that...

<snipp>
Client-Side Sorting and Paging
The GridView control provides you with the option of sorting and paging
records without requiring a form-post back to the Web server. In other
words, you can re-render the contents of a GridView when sorting and
paging, without needing to re-render the entire page.

You enable client paging and sorting by assigning the value true to the
EnableSortingAndPagingCallback property. When this property has the
value true, the GridView uses JavaScript to request an updated set of
records from the Web server.
<snipp>

I tried the piece of code that was provided...

<html>
<head runat="server">
<title>Callback GridView</title>
</head>
<body>
<form runat="server">

<%=DateTime.Now %>

<asp:GridView
DataSourceID="TitlesSource"
EnableSortingAndPagingCallbacks="true"
AllowPaging="true"
AllowSorting="true"
Runat="Server" />

<asp:SqlDataSource
ID="TitlesSource"
ConnectionString=
"Server=localhost;Database=pubs;Trusted_Connection =true"
SelectCommand="SELECT * FROM Titles"
Runat="Server" />
</form>
</body>
</html>

but even though sorting and paging callbacks are ENABLED, the TIME
which is NOT supposed to be updated, still gets updated everytime I do
a sort or change the page.

Does anyone have any idea why this is happening? Am I misunderstanding
the whole concept of callbacks? I made sure I am using the 2.0
framework and using ASP.NET 2.0, just because I installed Visual Studio
2005 on top of my existing Visual Studio 2003.

This sucks...I hope someone can shed some light for me into this.

Thanks for your time and help in advance.

Best Regards,

Tim :-)

Jul 21 '05 #1
0 2626

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

Similar topics

1
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...
5
by: yefei | last post by:
In my web design, I display records from a SQL DataBase according to some filters the GridView is defined with select commands and selest parameters however, I also want to display all records...
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...
3
by: Marc Grutte | last post by:
Hi I am trying to bind a custom datasource to a gridview whilst paging is enabled. What is missing in this code to make the paging + binding work? thanks M <%@ Page Language="VB" %>
0
by: Don Miller | last post by:
Here is an example of what I believe is a bug in ASP.NET 2.0 GridView paging without postbacks (or at least not documented how to fix it). Once the GridView is displayed, clicking on any of the...
4
by: Don Miller | last post by:
This is a repost of a reproducible problem/bug with GridView with dynamic SQL and binding. Is there a better ASP.NET newsgroup I should post to where MS techs or MVPs take an interest in such...
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...
1
by: John A Grandy | last post by:
In regard to a GridView that must support searching, filtering, sorting, and paging ... There is a tradeoff in performing the sorting and paging in the database versus to creating a CLR sort...
0
by: =?Utf-8?B?R3JlZw==?= | last post by:
I've been playing around with the GridView and for the most part am able to achieve most of what I need to. I am having just one problem and that's with the Sorting and Paging options. If I use a...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.