找回密码
 立即注册

QQ登录

只需一步,快速开始

zj602788658
金牌服务用户   /  发表于:2016-4-12 08:11  /   查看:3319  /  回复:3
spread如何将0值设置为空?

3 个回复

倒序浏览
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2016-4-12 11:06:45
沙发
新建一个自义定类型单元格,重现format 方法。
或者在cell value changing  的时候 判断是否接受0值
回复 使用道具 举报
zj602788658
金牌服务用户   /  发表于:2016-4-12 11:13:33
板凳
没有这个事件cell value changing
回复 使用道具 举报
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2016-4-12 15:05:58
地板
使用LeaveCell  事件。
fpSpread1.LeaveCell += FpSpread1_LeaveCell

  1.        private void FpSpread1_LeaveCell(object sender, LeaveCellEventArgs e)
  2.         {
  3.             if(fpSpread1.ActiveSheet.Cells[e.Row,e.Column].Value!=null && fpSpread1.ActiveSheet.Cells[e.Row, e.Column].Value.ToString() == "0")
  4.             {
  5.                 fpSpread1.ActiveSheet.Cells[e.Row, e.Column].Value = null;
  6.             }
  7.         }
复制代码
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部