Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

problem calling  datagrid  page index change through event handler

Posted on 2006-10-27
4
Medium Priority
?
273 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

618 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