SPGridView实现单元格换行


 前台:

  <asp:BoundField DataField="Integral" HeaderText="积分" />

  后台:

  dr["CompanyName"] += dt.Rows[j]["CompanyName"].ToString() + "\n";

  代码

  protected void SPGridView1_RowDataBound(object sender, GridViewRowEventArgs e)

  {

  if (e.Row.RowType == DataControlRowType.DataRow)

  {

  e.Row.Cells[1].Text = KeepPre(e.Row.Cells[1].Text);

  }

  }


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3