日期:2014-05-19  浏览次数:20525 次

来人救命了~~~~~~~~
public   void   SelectDataGrid(int   i)
{
                if(i==1)
{
                              this.dgCreatePlan.Enabled=false;
}
              else   if(i==2)
{
                              this.dgCreatePlan.Enabled=true;
}
}

private   void   DataGridBind(System.Web.UI.WebControls.DataGrid   dg,string   strCom)
{
    try
      {
          WebControlMethod.DataGridBind(dg,strCom);
      }
    catch(Exception   ex)
      {
          lbMsg.Text= "错误: "+ex.Message;
      }
}

public   void   CreatedUncplePlan()
{
      SelectDataGrid(2);
      this.lbPlanListType.Text= "我的项目> > 未完成项目 ";
      this.lbUncplPlan.Text= " <a   href= '# '   class= 'operate '> 未完成项目 </a> ";
      this.lbCpledPlan.Text= " <a   href= 'PlanController.aspx?action=createCpledPlan '   class= 'operate '> 已完成项目 </a> ";
      this.lbAddPlan.Text= " <img   src= '../../WebPic/func_new.gif '> <a   href= 'AddPlan.aspx '   class= 'operate '> 新建项目 </a> ";
      string   strSel= "exec   P_GetPlanList   ' "+this.EmpId+ " ', 'createdUncplPlan ' ";
      this.DataGridBind(this.dgCreatePlan,strSel);
}

分页有时候好使,有时候就没反应,没反映时在页面左下角会出现小叹号,提示页面有错误,请指点迷津~~~


<asp:datagrid   id= "dgCreatePlan "   runat= "server "   AutoGenerateColumns= "False "   DataKeyField= "mes_id "   Width= "800px "   AllowPaging=True   PageSize= "10 "   PagerStyle-Mode=NumericPages>
<HeaderStyle   CssClass= "headerStyle "   ForeColor= "White "   HorizontalAlign= "Center "   />
<ItemStyle   BackColor= "white "   />
<AlternatingItemStyle   BackColor= "#EEEEEE "   />
<PagerStyle   Mode=NumericPages   HorizontalAlign=Right   Position=TopAndBottom> </PagerStyle>
<Columns>
<asp:BoundColumn   HeaderText= "编号 "   DataField= "mes_id "> </asp:BoundColumn>
<asp:TemplateColumn   ItemStyle-Width= "300 "   HeaderText= "标题 ">
<ItemTemplate>
<a   style= "cursor:hand;   "   onmouseout= "hiddenDiv() "   onmouseover= "javascript:startRequest( ' <%#   DataBinder.Eval(Container.DataItem, "mes_id ")%> ', 'createdUncplPlan ') "   onclick= "javascript:viewPlan( ' <%#   DataBinder.Eval(Container.DataItem, "mes_id ")%> ', 'createdUncplPlan ') ">
<%#   DataBinder.Eval(Container.DataItem, "title ")%>
</a>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn   ItemSt