problem calling  datagrid  page index change through event handler

Posted on 2006-10-27
Last Modified: 2010-05-19
i have an event handler as follows
private void InitializeComponent()
                  this.MainWindowGrid.PageIndexChanged += new System.Web.UI.WebControls.DataGridPageChangedEventHandler(this.MainWindowGrid_PageIndexChanged);
my function (this.MainWindowGrid_PageIndexChanged) doesnt get called for the first time when i click any other page when my current page is the last page why so?
Question by:poogie22
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
  • 2
  • 2
LVL 13

Accepted Solution

jeebukarthikeyan earned 50 total points
ID: 17817923

private void grid1_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
                        this.grid1.CurrentPageIndex = e.NewPageIndex;

is ur datagrid pageindex like this

b u d d h a

Author Comment

ID: 17818020
please tell me what to write if i want to check

if       (MainWindowGrid.CurrentPageIndex != e.NewPageIndex)

                  {    }

in  page load

LVL 13

Expert Comment

ID: 17818049

u have any code to execute if the user is in last page

b u d d h a


Author Comment

ID: 17824896

Featured Post

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity mvc 2 43
Consume a webservice via VB in Visual Studio 2015 3 42
Adding Rows to Grid 4 29
How do you think this website does searches? 5 34
I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

739 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