Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 February 1st, 2004, 03:14 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default Paging problem with datareader and datagrid

i attach the datasource for the grid to a datareader and it works well , but when allow paging in the datagrid an error raised .

Ahmed Ali
Software Developer
__________________
Ahmed Ali
Senior Software Developer
 
Old February 1st, 2004, 04:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

What's the error?

 
Old February 6th, 2004, 09:08 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

thx Stu,
the error is datasource doesnot support icollection , so i attach the grid to a dataset source and it works fine,

Any have a comment

Ahmed Ali
Software Developer
 
Old September 9th, 2004, 02:14 AM
Registered User
 
Join Date: Sep 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Paging requires that you bind either a DataTable or DataSet object to the DataGrid; that is, [u]YOU CAN'T USE A DATAREADER.</u> This is because the DataGrid needs to be able to determine how many records are in the DataSource to be able to determine how many total pages of data exist.

http://msdn.microsoft.com/library/de...lesortable.asp

Cheers,

Sailesh Suvarna
 
Old September 9th, 2004, 02:31 AM
Registered User
 
Join Date: Sep 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Never tried with ADO.NET 2.0, but according to the foll. article
http://www.extremeexperts.com/Net/Ar...wFeatures.aspx

there is a new API "ExecutePageReader" which can be fiddled around with for Paging

Cheers,
Sailesh







Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid Paging Problem hoailing22 ASP.NET 1.0 and 1.1 Basics 5 April 23rd, 2006 03:15 AM
Problem in Paging in Datagrid Rahul Gupta ASP.NET 1.0 and 1.1 Basics 0 December 16th, 2005 07:58 AM
DataGrid Paging Problem! zakaria ASP.NET 1.0 and 1.1 Basics 1 April 8th, 2005 06:12 PM
DataGrid Paging Problem acyu0318 ASP.NET 1.0 and 1.1 Basics 2 March 2nd, 2004 12:05 PM





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