protected void OnPageChangedButton(object sender, EventArgs e)
 {
     DataNavigatorEventArgs args = new DataNavigatorEventArgs();
     args.CurrentPage = int.Parse(ddPage.SelectedItem.Text);
     args.TotalPages = int.Parse(lblTotalPages.Text);
     OnPageChanged(args);
 }
 protected virtual void OnPreviousPage(DataNavigatorEventArgs args)
 {
     if (PreviousPage != null)
     {
         // Invoke the delegates.
         PreviousPage(this, args);
     }
 }
 protected virtual void OnPageChanged(DataNavigatorEventArgs args)
 {
     if (PageChanged != null)
     {
         // Invoke the delegates.
         PageChanged(this, args);
     }
 }
        protected void OnPreviousPageButton(object sender, ImageClickEventArgs e)
        {
            DataNavigatorEventArgs args = new DataNavigatorEventArgs();
            args.CurrentPage = int.Parse(lblCurrentPage.Text);
            args.TotalPages = int.Parse(lblTotalPages.Text);

            SetDropDownPageNumber(args.CurrentPage - 1);

            OnPreviousPage(args);
        }
 protected void LastPage(object sender, DataNavigatorEventArgs e)
 {
     // Decrement the current page index.
     if (e.CurrentPage <= e.TotalPages)
     {
         ucDataNavigator.CurrentPage = e.TotalPages;
         // Get the data for the DataGrid.
         FillData(ucDataNavigator.CurrentPage);
         EnableDisableButtons(e.TotalPages);
     }
 }
 protected void PageSizeChanged(object sender, DataNavigatorEventArgs e)
 {
     ucDataNavigator.CurrentPage = e.CurrentPage;
     FillData(ucDataNavigator.CurrentPage);
     EnableDisableButtons(e.TotalPages);
 }
 protected virtual void OnLastPage(DataNavigatorEventArgs args)
 {
     if (LastPage != null)
     {
         // Invoke the delegates.
         LastPage(this, args);
     }
 }