藏经阁

佛说:前世的五百次回眸才能换得今生的一次擦肩而过, 那么,我要用多少次回眸才能真正住进你的心中?(——席慕蓉)

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

1、不换行:
word-break:keep-all;word-wrap:normal
2、换行:
word-break:break-all;word-wrap:break-word
以上的换行只支持英文,当标题中包含有中文时并不好用。
3、如果标题中含有中文的,只能在GridView的RowDataBound事件中添加代码,如下:

代码
if (e.Row.RowType == DataControlRowType.Header)
{
    e.Row.Cells[
0].Text = "<nobr>操作用户</nobr>";
            e.Row.Cells[
1].Text = "<nobr>批次名称</nobr>";
            e.Row.Cells[
2].Text = "<nobr>文件名称</nobr>";
            e.Row.Cells[
3].Text = "<nobr>档案类型</nobr>";
            e.Row.Cells[
4].Text = "<nobr>字段名称</nobr>";
            e.Row.Cells[
5].Text = "<nobr>字段值</nobr>";
            e.Row.Cells[
6].Text = "<nobr>字段长度</nobr>";
            e.Row.Cells[
7].Text = "<nobr>所在流程</nobr>";
            e.Row.Cells[
8].Text = "<nobr>开始时间</nobr>";
            e.Row.Cells[
9].Text = "<nobr>结束时间</nobr>";
            e.Row.Cells[
10].Text = "<nobr>录入版本</nobr>";            
}       

 

 

posted on 2010-02-01 17:22  小手冰凉  阅读(911)  评论(0编辑  收藏  举报