We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

datagrid paging problem

poogie22
poogie22 asked
on
Medium Priority
184 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.
Comment
Watch Question

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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
this event handler is already there but it does not fire for the last page
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

Author

Commented:
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.
hi,

where u are assigning val to pageIndex variable

b u d d h a

Author

Commented:
in page load i have written

PopulateObjects(tabPosition,MainWindowGrid.CurrentPageIndex);

Author

Commented:
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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.