?
Solved

datagrid paging problem

Posted on 2006-11-06
8
Medium Priority
?
173 Views
Last Modified: 2006-11-23
cannot return from the last page to a specific page ,it always displays the first page no matter which page is clicked.
0
Comment
Question by:poogie22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 13

Accepted Solution

by:
jeebukarthikeyan earned 1000 total points
ID: 17880017
hi,

u have to add the PageIndexChanged event handler to the datagrid

private void grdAttachments_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
    grdAttachments.CurrentPageIndex = e.NewPageIndex;
    connect2();//function to bind the datagrid
}

b u d d h a
0
 

Author Comment

by:poogie22
ID: 17880024
this event handler is already there but it does not fire for the last page
0
 
LVL 13

Expert Comment

by:jeebukarthikeyan
ID: 17880036
hi,
have u set any page index in the function which connects datagrid with the value;
check the page load also

b u d d h a
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:poogie22
ID: 17880226
i have set a page index in the following ,lines
MainWindowGrid.CurrentPageIndex = pageIndex;
but after clicking on any page when i am in the last page the current page index is always 0.
0
 
LVL 13

Expert Comment

by:jeebukarthikeyan
ID: 17880247
hi,

where u are assigning val to pageIndex variable

b u d d h a
0
 

Author Comment

by:poogie22
ID: 17880315
in page load i have written

PopulateObjects(tabPosition,MainWindowGrid.CurrentPageIndex);
0
 

Author Comment

by:poogie22
ID: 17880318
in page load i have written

PopulateObjects(tabPosition,MainWindowGrid.CurrentPageIndex);
but but after clicking on any page when i am in the last page the current page index is always 0.
0
 
LVL 12

Expert Comment

by:sandip132
ID: 17953786
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question