Solved

problem calling  datagrid  page index change through event handler

Posted on 2006-10-27
4
257 Views
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?
0
Comment
Question by:poogie22
  • 2
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
jeebukarthikeyan earned 50 total points
ID: 17817923
hi,

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

is ur datagrid pageindex like this

b u d d h a
0
 

Author Comment

by:poogie22
ID: 17818020
hi,
please tell me what to write if i want to check


if       (MainWindowGrid.CurrentPageIndex != e.NewPageIndex)

                  {    }

in  page load

thanks.
0
 
LVL 13

Expert Comment

by:jeebukarthikeyan
ID: 17818049
hi,

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

b u d d h a

0
 

Author Comment

by:poogie22
ID: 17824896
yes
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
creating a flowchart from an algorithm 5 30
Trouble with References... 5 44
Problem to page 4 74
Asp.net mvc foreach 3 35
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on 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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

21 Experts available now in Live!

Get 1:1 Help Now