Solved

problem calling  datagrid  page index change through event handler

Posted on 2006-10-27
4
255 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

759 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

19 Experts available now in Live!

Get 1:1 Help Now