当jqGrid单元格中的NaN时为空白 [英] Blank when NaN in jqGrid cells

查看:323
本文介绍了当jqGrid单元格中的NaN时为空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在jqGrid单元格中设置空白而不是NaN?使用格式化程序?有例子吗?

How to set blank instead of NaN in jqGrid cells ? Using formatter ? Is there an example?

推荐答案

这真的很老,但是jqGrid文档没有一个简单的答案,当我寻找相同的答案时,这个问题首先出现在Google搜索结果中.

This is REALLY old but the jqGrid documentation didn't have an easy answer and this question pulls up first in Google results when I was looking for the same answer.

使用以下代码对整数使用预定义的格式化程序选项时,我能够显示空白单元格而不是0:

I was able to display a blank cell instead of a 0 when using the predefined formatter option for an integer using this code:

{ name: 'Quantity', formatter: 'integer', formatoptions: { defaultValue: ''} }

defaultValue只是设置为空白.

这篇关于当jqGrid单元格中的NaN时为空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆