In fact, error is clear. Suppose that, your datagrid has a pagesize at 20.
You have 100 rows means five pages. And you are viewing 4th page. than u
change datasource in some way by refetching data or filtering data. And now
your datasource contains 25 rows which means there is no 4th page.It is a
common problem in .NET framework 1.1. But it is fixed with 2.0
My advice u after refreshing datasource set current page index to first
page.
--
Thanks,
Yunus Emre ALPÖZEN
BSc, MCAD.NET
"asad" <as**@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com...
Hello i'm using ASP.NET Datagrid paging but i found and error if i forward
to
next page
following errror occur pls tell me to get rid of this error,Thanks.
" Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount
below is my query to fetch data from database
Dim sqlq as string
sqlq="SELECT softwarehouse,address,phone,URL from softhouse where cityID=
('" & c & "') "