473,230 Members | 1,511 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,230 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 :-)

Nov 19 '05 #1
1 7450
It's broken in the beta 2 bits and will be fixed in RTM.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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...a/gridview.asp
x

(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...ry/en-us/dnvs0
5/html/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 :-)


Nov 19 '05 #2

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...
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...
3
by: mazdotnet | last post by:
Hi everyone, I know when you enable paging in a datagrid the entire data is read but only the data that you want is displayed to the end user. Has this changed for Gridview? So if you have 10000...
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...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.