為什麼我的DataGrid 在進行數據綁定的時候分葉不成功 ?DataGrid1.AllowPaging = true;
DataGrid1.AllowCustomPaging = true;
DataGrid1.PagerStyle.Mode = PagerMode.NumericPages;
DataGrid1.PagerStyle.PageButtonCount = 5;
DataGrid1.PageSize = 8;
string strSel = "SELECT count(*) FROM tempcar WHERE SalDepartID='" + Session["SalDepartID"].ToString() + "'"; 
fun = new function();
DataGrid1.VirtualItemCount = fun.jilutiaoshu(strSel);
BindGrid();
------------------------------
//********************
//上一頁按鈕
//********************
private void Next_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
if(this.DataGrid1.CurrentPageIndex > 0)
      this.DataGrid1.CurrentPageIndex -= 1;
this.BindGrid();
}
//********************
//下一頁按鈕
//********************
private void Pre_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
         if (this.DataGrid1.CurrentPageIndex<(this.DataGrid1.PageCount-1))
this.DataGrid1.CurrentPageIndex += 1;
this.BindGrid();
}