Wrox Programmer Forums
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 October 16th, 2004, 02:49 AM
Friend of Wrox
Join Date: Jun 2004
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pagination error

In my form there are four datagrids,i have added paging to all those datagrids and displaying 4 records in one page.
But getting error:

"AllowCustomPaging must be true and VirtualItemCount must be set for a DataGrid with ID DataGrid2 when AllowPaging is set to true and the selected datasource does not implement ICollection. "

In aspx file i have set the properties of datagrid as

<asp:datagrid id="DataGrid2" Runat="Server" width="100%" autogeneratecolumns="False" cellpadding="5" cellspacing="0" showheader="True" borderwidth="2px" gridlines="Both" bordercolor="#FFFFFF" AllowPaging="True" PageSize="4">

and in code behind after initialising that event i have written

private void DataGrid2_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEvent Args e)
            DataGrid2.CurrentPageIndex = e.NewPageIndex;

Anyone can solve this problem, why this error is coming?

Old October 16th, 2004, 05:20 AM
Authorized User
Join Date: Jul 2004
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aravwind Send a message via Yahoo to aravwind

Where are binding the data
Old October 17th, 2004, 11:28 PM
Friend of Wrox
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi

Did u set the AllowCustomPaging to true and set the virtualitemcount to some value.Where is binding of data?

Check out this article if may help you...


Similar Threads
Thread Thread Starter Forum Replies Last Post
pagination Regornil Pro JSP 2 May 31st, 2005 06:10 AM
Please.....Pagination junemo PHP Databases 2 September 25th, 2004 01:14 PM
Problem with pagination fung Classic ASP Basics 4 August 23rd, 2004 07:42 AM
pagination junemo Oracle 0 July 1st, 2004 04:07 AM
Pagination problems - please help Jams30 PHP How-To 3 December 18th, 2003 04:02 PM

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