I have input field which contains decimal and special characters e.g. comma and dot while calulating the maxLength of the field i want to skip special characters :
{
name: "amount",
width: 62,
template: "number",
formatter: "number",
formatoptions: {
decimalSeparator:",",
thousandsSeparator: " ",
decimalPlaces: 4,
defaultValue: '0.0000'
},
editoptions: {
maxlength; 5
type: "number"
}
},
I when edit inline record filed "PackageCode" is count decimalSeparator I want don't count decimalSeparator
see demo :https://jsfiddle.net/dnfk8hmr/288/
I'm not sure that I understand what you need to implement. jqGrid don't count
decimalSeparator
or anything else during inline editing. It just set static value ofmaxlength
, which you use (maxlength="5"
). If you need to allows to edit more long values, like125.22
in your demo, then you can setmaxlength
dynamically like in the demo https://jsfiddle.net/OlegKi/dnfk8hmr/309/, which usedAdditionally you should fix
defaultValue
to use comma instead of dot (0,00
instead of0.00
or0,0000
instead of0.0000
) if you use formatter optiondecimalSeparator:","
.