예제 #1
0
 protected override void AttachChildControls()
 {
     this.txtSearchText          = (TextBox)this.FindControl("txtSearchText");
     this.dropPageSize           = (PageSizeDropDownList)this.FindControl("dropPageSize");
     this.btnSearchButton        = ButtonManager.Create(this.FindControl("btnSearchButton"));
     this.dropMemberRank         = (MemberGradeDropDownList)this.FindControl("rankList");
     this.btnSearchButton.Click += new EventHandler(this.btnSearchButton_Click);
     if (!this.Page.IsPostBack)
     {
         this.InitializeControls();
     }
 }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            PageSizeDropDownList PageSizeDropDownList1 = (PageSizeDropDownList)SiteUtils.FindControlRecursive(this, "PageSizeDropDownList1");

            PageSizeDropDownList1.AutoPostBack          = true;
            PageSizeDropDownList1.SelectedIndexChanged += new EventHandler(PageSizeDropDownList1_SelectedIndexChanged);

            Grid.SortCommand   += new DataGridSortCommandEventHandler(Grid_SortCommand);
            Grid.EditCommand   += new DataGridCommandEventHandler(Grid_EditCommand);
            Grid.CancelCommand += new DataGridCommandEventHandler(Grid_CancelCommand);
            Grid.ItemDataBound += new DataGridItemEventHandler(Grid_ItemDataBound);
            Grid.UpdateCommand += new DataGridCommandEventHandler(Grid_UpdateCommand);
            Grid.DeleteCommand += new DataGridCommandEventHandler(Grid_DeleteCommand);
            Grid.ItemCommand   += new DataGridCommandEventHandler(Grid_ItemCommand);
        }
예제 #3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!Page.IsPostBack)
            {
                PageSizeDropDownList PageSizeDropDownList1 = (PageSizeDropDownList)SiteUtils.FindControlRecursive(this, "PageSizeDropDownList1");
                PageSizeDropDownList1.SafeSelectValue(SavedSearch.PageSize);

                if (SavedSearch.HasSearch)
                {
                    RetrieveSearchAndBindGrid();
                }
                else if (BindOnLoad)
                {
                    PerformSearchAndBindGrid(1);
                }
            }
        }