//Gridview翻页 protected void Grid_Third_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView theGrid = sender as GridView; // refer to the GridView int newPageIndex = 0; if (-2 == e.NewPageIndex) { TextBox txtNewPageIndex = null; GridViewRow pagerRow = Grid_Third.BottomPagerRow; if (null != pagerRow) { txtNewPageIndex = (TextBox)pagerRow.FindControl("textbox3"); // refer to the TextBox with the NewPageIndex value } if (null != txtNewPageIndex && txtNewPageIndex.Text != "") { newPageIndex = int.Parse(txtNewPageIndex.Text) - 1; // get the NewPageIndex } } else { newPageIndex = e.NewPageIndex; } string condition = GetCondition3(); BindGrid_Third(condition); newPageIndex = newPageIndex < 0 ? 0 : newPageIndex; newPageIndex = newPageIndex >= Grid_Third.PageCount ? Grid_Third.PageCount - 1 : newPageIndex; Grid_Third.PageIndex = newPageIndex; Grid_Third.DataBind(); }
//DropDownList3下拉表绑定 //private void BindDropDownList3() //{ // this.DropDownList3.DataSource = basicCodeL.Search_BDOrganization_BDdepcode(); // this.DropDownList3.DataTextField = "BDOS_Name"; // this.DropDownList3.DataValueField = "BDOS_Name"; // this.DropDownList3.DataBind(); // this.DropDownList3.Items.Insert(0, new ListItem("请选择", "")); //} //DropDownList4下拉表绑定 //private void BindDropDownList4() //{ // this.DropDownList4.DataSource = basicCodeL.Search_BDOrganization_BDdepcode(); // this.DropDownList4.DataTextField = "BDOS_Name"; // this.DropDownList4.DataValueField = "BDOS_Name"; // this.DropDownList4.DataBind(); // this.DropDownList4.Items.Insert(0, new ListItem("请选择", "")); //} //第三层次文件类别代码列表Grid_Third private void BindGrid_Third(string condition) { Grid_Third.DataSource = basicCodeL.Search_CDThirdLevelCode(condition); Grid_Third.DataBind(); }