找回密码
 立即注册

QQ登录

只需一步,快速开始

thesadfrog

银牌会员

6

主题

14

帖子

2958

积分

银牌会员

积分
2958

活字格认证

thesadfrog
银牌会员   /  发表于:2011-10-26 15:10  /   查看:4706  /  回复:1
记得好像winform版的有

asp 3.0  如何设置 ?

单元格如果是 0, 就不显示.如何设置?

1 个回复

正序浏览
iceman
社区贡献组   /  发表于:2011-10-27 09:59:00
沙发

回复 1# thesadfrog 的帖子

你好,实现上述功能需要:继承对应单元格类型创建自定义单元格类型,重载Format() 方法,代码如下(以 DoubleCellType 演示):
  1. [Serializable]
  2. public class UserDefinedCellType : FarPoint.Web.Spread.DoubleCellType
  3. {
  4.      public override string Format(object obj)
  5.      {
  6.          string ret=obj.ToString();
  7.          if (ret=="0")
  8.          {
  9.               return "";
  10.           }
  11.           else
  12.           return base.Format(obj);
  13.         }
  14.     }
复制代码
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部