/// <summary>
        /// Handles the <see cref="RadGrid.ItemCreated"/> event of the <see cref="JobsGrid"/> control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="GridItemEventArgs"/> instance containing the event data.</param>
        private void JobsGrid_ItemCreated(object sender, GridItemEventArgs e)
        {
            var commandItem = e.Item as GridCommandItem;

            if (commandItem != null)
            {
                // control information from http://www.telerik.com/help/aspnet-ajax/grddefaultbehavior.html
                commandItem.FindControl("AddNewRecordButton").Visible = false;
                commandItem.FindControl("InitInsertButton").Visible   = false;
                commandItem.FindControl("RefreshButton").Visible      = false;
                commandItem.FindControl("RebindGridButton").Visible   = false;

                var tableHeaderResourceKey = commandItem.OwnerTableView == this.JobsGrid.MasterTableView
                    ? "JobsTableHeader"
                    : "ApplicationsTableHeader";

                var leftColumn = commandItem.FindControl("AddNewRecordButton").Parent;
                leftColumn.Controls.Add(new LiteralControl(this.Localize(tableHeaderResourceKey)));

                // from http://www.telerik.com/help/aspnet-ajax/grdexportwithajax.html
                AJAX.RegisterPostBackControl(commandItem.FindControl("ExportToExcelButton"));
                AJAX.RegisterPostBackControl(commandItem.FindControl("ExportToCsvButton"));
            }
            else
            {
                // control information from http://www.telerik.com/help/aspnet-ajax/grdaccessingdefaultpagerbuttons.html
                var pagerItem = e.Item as GridPagerItem;
                if (pagerItem != null)
                {
                    ((Label)pagerItem.FindControl("ChangePageSizeLabel")).Text = this.Localize("Change Page Size Label.Text");
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            if (!this.PermissionsService.CanManageEvents)
            {
                this.DenyAccess();
                return;
            }

            base.OnInit(e);
            AJAX.RegisterPostBackControl(this.SaveEventButton);
            AJAX.RegisterPostBackControl(this.SaveAndCreateNewEventButton);

            this.Load += this.Page_Load;
            this.SaveEventButton.Click             += this.SaveEventButton_Click;
            this.SaveAndCreateNewEventButton.Click += this.SaveAndCreateNewEventButton_Click;
            this.CancelButton.Click                        += this.CancelButtonClick;
            this.CancelGoHomeButton.Click                  += this.CancelGoHomeButton_Click;
            this.DeleteAction.Delete                       += this.DeleteAction_Delete;
            this.CreateAnotherEventLink.Click              += this.CreateAnotherEventLink_Click;
            this.RecurringCheckBox.CheckedChanged          += this.RecurringCheckbox_CheckedChanged;
            this.AllowRegistrationsCheckBox.CheckedChanged += this.AllowRegistrationsCheckBox_CheckedChanged;
            this.LimitRegistrationsCheckBox.CheckedChanged += this.LimitRegistrationsCheckBox_CheckedChanged;
            this.CapacityMetMessageRadioButtonList.SelectedIndexChanged += this.CapacityMetMessageRadioButtonList_SelectedIndexChanged;
            this.RecurrenceEditorValidator.ServerValidate   += this.RecurrenceEditorValidator_ServerValidate;
            this.UniqueCategoryNameValidator.ServerValidate += this.UniqueCategoryNameValidator_ServerValidate;
        }
        protected override void OnInit(EventArgs e)
        {
            this.Load += this.Page_Load;

            AJAX.RegisterPostBackControl(btnUploadThumbnail);
            base.OnInit(e);
        }
        /// <summary>
        /// Raises the <see cref="Control.Init"/> event.
        /// </summary>
        /// <param name="e">An <see cref="EventArgs"/> object that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            this.Load += this.Page_Load;
            this.AddToCalendarButton.Click += this.AddToCalendarButton_Click;

            AJAX.RegisterPostBackControl(this.AddToCalendarButton);
        }
Esempio n. 5
0
 protected override void OnInit(EventArgs e)
 {
     JavaScript.RequestRegistration(CommonJs.DnnPlugins);
     _cookie = string.Format("_Module_{0}_Survey_{1}_", ModuleId, ResultsVersion);
     AddActionHandler(SurveyActions_Click);
     AJAX.RegisterPostBackControl(SubmitSurveyButton);
     AJAX.RegisterPostBackControl(ExportToCsvButton);
     base.OnInit(e);
 }
Esempio n. 6
0
        protected new void Page_Init(object sender, EventArgs e)
        {
            base.Page_Init(sender, e);

            if (AJAX.IsInstalled())
            {
                AJAX.RegisterPostBackControl(btnUpload);
            }
        }
Esempio n. 7
0
 /// <summary>
 ///   ShowButton configures and displays a button
 /// </summary>
 /// <param name = "button">The button to configure</param>
 /// <param name = "command">The command name (amd key) of the button</param>
 private void ShowButton(LinkButton button, string command)
 {
     button.Visible = true;
     if (!string.IsNullOrEmpty(command))
     {
         button.Text = Utilities.GetLocalizedString(command);
     }
     AJAX.RegisterPostBackControl(button);
     _pnlButtons.Visible = true;
 }
Esempio n. 8
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.PreRender += this.Page_PreRender;
            this.AddToCalendarButton.Click += this.AddToCalendarButton_Click;
            this.EditButton.Click          += this.EditButton_Click;

            this.RegisterButton.CurrentEvent        = this.currentEvent;
            this.RegisterButton.ModuleConfiguration = this.ModuleConfiguration;
            this.RegisterButton.LocalResourceFile   = this.LocalResourceFile;

            AJAX.RegisterPostBackControl(this.AddToCalendarButton);
        }
Esempio n. 9
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            if (!this.PermissionsService.CanViewResponses)
            {
                this.DenyAccess();
            }

            AJAX.RegisterPostBackControl(this.ExportToCsvButton);
            AJAX.RegisterPostBackControl(this.ExportToExcelButton);

            base.OnInit(e);
            this.Load += this.Page_Load;
            this.ExportToCsvButton.Click   += this.ExportToCsvButton_Click;
            this.ExportToExcelButton.Click += this.ExportToExcelButton_Click;
            this.SortRadioButtonList.SelectedIndexChanged += this.SortRadioButtonList_SelectedIndexChanged;
        }
Esempio n. 10
0
        /// <summary>
        ///     Load current settings into the controls from the modulesettings
        /// </summary>
        /// <remarks></remarks>
        public override void LoadSettings()
        {
            // Force full PostBack since these pass off to aspx page
            if (AJAX.IsInstalled())
            {
                AJAX.RegisterPostBackControl(this.cmdUpgrade);
            }

            var emSettings = EventModuleSettings.GetEventModuleSettings(this.ModuleId, this.LocalResourceFile);

            var dummyRmid = emSettings.RecurDummy;

            this.divUpgrade.Visible = false;
            this.divRetry.Visible   = false;
            if (!string.IsNullOrEmpty(dummyRmid) &&
                dummyRmid != "99999")
            {
                this.divUpgrade.Visible = true;
            }
        }
Esempio n. 11
0
 public void RegisterForPostback()
 {
     AJAX.RegisterPostBackControl(link);
     AJAX.RegisterPostBackControl(icon);
 }
Esempio n. 12
0
 protected override void OnLoad(EventArgs e)
 {
     AJAX.RegisterPostBackControl(this.QueryUploadButton);
     base.OnLoad(e);
 }