C
ck388
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)
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/default.asp?url=/library/en-us/dnvs05/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
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)
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/default.asp?url=/library/en-us/dnvs05/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