SmartClient Version: v11.0p_2017-02-11/PowerEdition Deployment (built 2017-02-11)
I am using ds files.
I have a field defined as : <field name="listPrice" type="float" title="List Price" width="70" format="$#,##0.00"/>
On client side, i have set the formatter as :
ListGridField listPriceField = new ListGridField("listPrice", "List Price");
listPriceField.setCellFormatter(new CellFormatter() {
@Override
public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
if (value == null)
return null;
NumberFormat nf = NumberFormat.getFormat("#,##0.00");
try {
return "$" + nf.format(((Number) value).floatValue());
} catch (Exception e) {
return value.toString();
}
}
});
I have set autofilter to true. But i am not able to enter any number. I need to enter $ before entering a number.
However,, when i enter $ followed by number, i do not get any result. Where am i going wrong.
I am using ds files.
I have a field defined as : <field name="listPrice" type="float" title="List Price" width="70" format="$#,##0.00"/>
On client side, i have set the formatter as :
ListGridField listPriceField = new ListGridField("listPrice", "List Price");
listPriceField.setCellFormatter(new CellFormatter() {
@Override
public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
if (value == null)
return null;
NumberFormat nf = NumberFormat.getFormat("#,##0.00");
try {
return "$" + nf.format(((Number) value).floatValue());
} catch (Exception e) {
return value.toString();
}
}
});
I have set autofilter to true. But i am not able to enter any number. I need to enter $ before entering a number.
However,, when i enter $ followed by number, i do not get any result. Where am i going wrong.
Comment