Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 25th, 2007, 04:54 AM
Registered User
 
Join Date: Nov 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 1-GridView Paging

Hi, I'm a reader from Taiwan
This book helps me a lot
Now,I have some problems
I tried to use Paging with GridView
but it didn't work
Then I found some code from website can solve this problem
but they didn't use Procedure
I'm not sure how to use

 
Old November 25th, 2007, 05:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Carl,

Can you define "it didn't work"? Do you get an error? If so, what error do you get, and where? Can you post the relevant parts of the code?

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old November 25th, 2007, 06:36 AM
Registered User
 
Join Date: Nov 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
When I enabled "AllowPaging" with eventsGridView in "DiaryMain.aspx"
Then open the page
I got an error "The data source does not support server-side data paging."

 
Old November 25th, 2007, 06:56 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Right, I see. The SqlDataReader (returned by the ObjectDataSource) doesn't support server side paging, so you need to look at other solutions. Take a look at these articles to get some ideas:

http://aspnet.4guysfromrolla.com/articles/031506-1.aspx
http://forums.microsoft.com/MSDN/Sho...86493&SiteID=1

You can also change the GetDiaryEventByDate procedure and have it return only the requested page of records from the database. Bottom line: not supported out of the box, but it's definitely possible to implement.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Paging in gridview control VadimZ ASP.NET 2.0 Professional 8 February 17th, 2010 02:12 AM
Paging problem in gridview kalyanykk ASP.NET 3.5 Basics 1 December 8th, 2008 03:33 AM
[Resolved] GridView Sorting and Paging snufse ASP.NET 2.0 Basics 1 October 9th, 2008 07:45 AM
Sorting and Paging of gridview lily611 C# 2005 0 April 24th, 2008 03:09 AM
Sorting and Paging GridView using Alphabets yukijocelyn ASP.NET 2.0 Basics 9 August 29th, 2007 04:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.