DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 25 Jun 2007 19:42:10 GMT,    posted on: microsoft.public.dotnet.framework.aspnet.datagridcontrol        back       

Thread Index
  1    Vince13 u35350@uwe


Another Paging Problem   
I'm fairly new to c# and Visual Studio.  I've been having what seems like a
common paging problem.  When I try to change pages (even just from the first
page to the second), the error comes up:

       Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount.

I have found many solutions on different websites, but they all have to do
with deleting entries on a page and then trying to use a CurrentPageIndex
larger than the PageCount.  However, I have checked both of these variables
and they should be fine.  I even added an if statement to guard against it
and the error still comes up.  

        DataGrid1.CurrentPageIndex = e.NewPageIndex;
        if (DataGrid1.CurrentPageIndex >= 0 && DataGrid1.CurrentPageIndex <
DataGrid1.PageCount)
        {
    DataGrid1.DataBind();
        }

If there is anyone who can give me any idea where to start to fix this
problem, I would greatly appriciate it.
Date:Mon, 25 Jun 2007 19:42:10 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us