Solved

datagrid paging problem

Posted on 2006-11-06
8
166 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
  • 4
  • 3
8 Comments
 
LVL 13

Accepted Solution

by:
jeebukarthikeyan earned 500 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
 

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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now