Exemplo n.º 1
0
    //翻页
    protected void Grid_CFRoute_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_CFRoute.BottomPagerRow;


            if (null != pagerRow)
            {
                txtNewPageIndex = (TextBox)pagerRow.FindControl("textbox");   // 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;
        }
        BindGrid2(id3);
        newPageIndex           = newPageIndex < 0 ? 0 : newPageIndex;
        newPageIndex           = newPageIndex >= Grid_CFRoute.PageCount ? Grid_CFRoute.PageCount - 1 : newPageIndex;
        Grid_CFRoute.PageIndex = newPageIndex;
        Grid_CFRoute.DataBind();
    }
Exemplo n.º 2
0
 //绑定认证工艺路线工序Gridview3
 private void BindGrid3(Guid PT_ID)
 {
     Grid_CFRoute.DataSource = iQCBasicDataL.Search_PRDetail_RZR(PT_ID);
     Grid_CFRoute.DataBind();
 }