protected void ddPaging_SelectedIndexChanged(object sender, EventArgs e) { DropDownList dropDownList = (DropDownList)sender; this.MainListView.CurrentPageSize = Convert.ToInt32(dropDownList.SelectedValue) == -1 ? int.MaxValue : Convert.ToInt32(dropDownList.SelectedValue); EcfListView.SavePageSize(this.Page, this.ViewId, this.MainListView.CurrentPageSize); this.ResetPageNumber(true); }
/// <summary> /// Handles the SelectedIndexChanged event of the ddPaging 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> protected void ddPaging_SelectedIndexChanged(object sender, EventArgs e) { DropDownList ddPaging = (DropDownList)sender; if (Convert.ToInt32(ddPaging.SelectedValue) != -1) { MainListView.CurrentPageSize = Convert.ToInt32(ddPaging.SelectedValue); } else MainListView.CurrentPageSize = Int32.MaxValue; // save new pageSize EcfListView.SavePageSize(this.Page, this.ViewId, MainListView.CurrentPageSize); ResetPageNumber(true); }