Example #1
0
        // ...
        /// <summary>
        /// Raises the <see cref="E:PageSizeChanged"/> event.
        /// </summary>
        /// <param name="e">The <see cref="Mediachase.Web.UI.DataGridPageSizeChangedEventArgs"/> instance containing the event data.</param>
        protected virtual void OnPageSizeChanged(DataGridPageSizeChangedEventArgs e)
        {
            DataGridPageSizeChangedEventHandler dataGridPageSizeChangedEventHandler = (DataGridPageSizeChangedEventHandler)base.Events[EventPageSizeChanged];

            if (dataGridPageSizeChangedEventHandler != null)
            {
                dataGridPageSizeChangedEventHandler(this, e);
            }
        }
Example #2
0
        /// <summary>
        /// Called when [change page size].
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        public void OnChangePageSize(Object sender, System.EventArgs args)
        {
            int          _PageSize = 10;
            DropDownList ddl       = (DropDownList)sender;

            if (ddl != null)
            {
                _PageSize = int.Parse(ddl.SelectedItem.Value);
            }

            DataGridPageSizeChangedEventArgs dataGridPageSizeChangedEventArgs = new DataGridPageSizeChangedEventArgs(sender, _PageSize);

            OnPageSizeChanged(dataGridPageSizeChangedEventArgs);
        }