Ejemplo n.º 1
0
        /// <summary>
        /// Handles the Click event of the lbPageSize control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void lbItems_Click(object sender, EventArgs e)
        {
            LinkButton lbItems = sender as LinkButton;

            if (lbItems != null && ItemsPerPageClick != null)
            {
                int itemsPerPage = ALL_ITEMS_SIZE;

                switch (lbItems.Text)
                {
                case "25":
                    itemsPerPage = 25;
                    break;

                case "100":
                    itemsPerPage = 100;
                    break;

                case "1,000":
                    itemsPerPage = 1000;
                    break;
                }

                NumericalEventArgs eventArgs = new NumericalEventArgs(itemsPerPage);

                ItemsPerPageClick(sender, eventArgs);
            }
        }
Ejemplo n.º 2
0
 void lbPage_Click(object sender, EventArgs e)
 {
     if (NavigateClick != null)
     {
         LinkButton lbPage = sender as LinkButton;
         if (lbPage != null)
         {
             int pageIndex = 0;
             if (Int32.TryParse(lbPage.Attributes["page-index"], out pageIndex))
             {
                 NumericalEventArgs eventArgs = new NumericalEventArgs(pageIndex);
                 NavigateClick(sender, eventArgs);
             }
         }
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Handles the Click event of the lbPage control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
 void lbPage_Click( object sender, EventArgs e )
 {
     if ( NavigateClick != null )
     {
         LinkButton lbPage = sender as LinkButton;
         if ( lbPage != null )
         {
             int pageIndex = 0;
             if ( Int32.TryParse( lbPage.Attributes["page-index"], out pageIndex ) )
             {
                 NumericalEventArgs eventArgs = new NumericalEventArgs( pageIndex );
                 NavigateClick( sender, eventArgs );
             }
         }
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Handles the Click event of the lbPageSize control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void lbItems_Click( object sender, EventArgs e )
        {
            LinkButton lbItems = sender as LinkButton;
            if ( lbItems != null && ItemsPerPageClick != null )
            {
                int itemsPerPage = 50;

                switch ( lbItems.Text )
                {
                    case "50":
                        itemsPerPage = 50;
                        break;
                    case "500":
                        itemsPerPage = 500;
                        break;
                    case "5,000":
                        itemsPerPage = 5000;
                        break;
                }

                NumericalEventArgs eventArgs = new NumericalEventArgs( itemsPerPage );

                ItemsPerPageClick( sender, eventArgs );
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Handles the NavigateClick event of the pagerTemplate control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Rock.Web.UI.Controls.NumericalEventArgs"/> instance containing the event data.</param>
 void pagerTemplate_NavigateClick( object sender, NumericalEventArgs e )
 {
     this.PageIndex = e.Number;
     OnGridRebind( e );
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Handles the ItemsPerPageClick event of the pagerTemplate control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="Rock.Web.UI.Controls.NumericalEventArgs"/> instance containing the event data.</param>
        void pagerTemplate_ItemsPerPageClick( object sender, NumericalEventArgs e )
        {
            var rockPage = this.Page as RockPage;
            if ( rockPage != null )
            {
                rockPage.SetUserPreference( PAGE_SIZE_KEY, e.Number.ToString() );
            }

            this.PageSize = e.Number;
            OnGridRebind( e );
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Handles the ItemsPerPageClick event of the pagerTemplate control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Rock.Web.UI.Controls.NumericalEventArgs"/> instance containing the event data.</param>
 void pagerTemplate_ItemsPerPageClick( object sender, NumericalEventArgs e )
 {
     this.PageSize = e.Number;
     OnGridRebind( e );
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Handles the NavigateClick event of the pagerTemplate control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Rock.Web.UI.Controls.NumericalEventArgs"/> instance containing the event data.</param>
 void pagerTemplate_NavigateClick(object sender, NumericalEventArgs e)
 {
     this.PageIndex = e.Number;
     OnGridRebind(e);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Handles the ItemsPerPageClick event of the pagerTemplate control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Rock.Web.UI.Controls.NumericalEventArgs"/> instance containing the event data.</param>
 void pagerTemplate_ItemsPerPageClick(object sender, NumericalEventArgs e)
 {
     this.PageSize = e.Number;
     OnGridRebind(e);
 }