Solved

datagrid paging problem

Posted on 2006-11-06
8
169 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

837 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