protected void SetupEventHandlers() { AlertsGridPanel.DataSourceCreated += delegate(AlertDataSource source) { if (!String.IsNullOrEmpty(ComponentFilter.Text)) { source.Component = SearchHelper.LeadingAndTrailingWildCard(ComponentFilter.Text); } if (LevelFilter.SelectedIndex > 0) { source.Level = AlertLevelEnum.GetEnum(LevelFilter.SelectedValue); } if (CategoryFilter.SelectedIndex > 0) { source.Category = AlertCategoryEnum.GetEnum(CategoryFilter.SelectedValue); } source.DateFormats = InsertDateCalendarExtender.Format; if (!String.IsNullOrEmpty(InsertDateFilter.Text)) { source.InsertTime = InsertDateFilter.Text; } }; DeleteConfirmationBox.Confirmed += delegate(object data) { if (data == null) { return; } ArrayList keys = (ArrayList)data; for (int i = 0; i < keys.Count; i++) { _theController.DeleteAlertItem(keys[i] as ServerEntityKey); } OnAlertDeleted(); }; DeleteAllConfirmationBox.Confirmed += DeleteAllConfirmDialog_Confirmed; // TODO: We should do this in GridPager.InitializeGridPager() AlertsGridPanel.TheGrid.DataBound += delegate { GridPagerTop.Refresh(); }; }