?
Solved

problem calling  datagrid  page index change through event handler

Posted on 2006-10-27
4
Medium Priority
?
272 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
[X]
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
4 Comments
 
LVL 13

Accepted Solution

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

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

764 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