您可以創建自己的自定義表單。
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_formatter
指南介紹得很好。您必須創建一個formmater和一個unformmater進行編輯。
創建格式化函數是這樣的:
<script>
jQuery("#grid_id").jqGrid({
...
colModel: [
...
{name:'price', index:'price', width:60, align:"center", editable: true, formatter:numFormat, unformat:numUnformat},
...
]
...
});
function numFormat(cellvalue, options, rowObject){
return cellvalue.replace(".",",");
}
function numUnformat(cellvalue, options, rowObject){
return cellvalue.replace(",",".");
}
</script>
您還可以追加$或在這些功能的其它格式。
Nota Bene:當盎格魯撒克遜人使用「千分之一轉換器是大陸的空間」,「 – nicolallias 2015-02-04 08:33:54
這不會回答問題的所有者給出的問題。 – Jpepper 2015-02-05 17:55:13
這就是爲什麼它是一個評論;如果你保留英語千分位符號,你將得到任何數字符號的廢話,例如 例如12,345,678.9 - > 12,345,678,9 而不是正確的(和所有者請求的) 12345678,9 – nicolallias 2015-02-06 11:17:14