Hi,
I'm using SmartClient version 10.0. on Google Chrome. JavaScript errors are not present.
My ListGrid config looks like:
isc.NumberUtil.addClassProperties({ groupingFormat: 1, groupingSymbol: ".", decimalSymbol: ",", decimalPrecision: 4 });
isc.ListGrid.create({
ID: "warehouseOperationItemsGrid",
/* Customize look */
canResizeFields: true,
alternateRecordStyles: true,
wrapHeaderTitles: true,
autoFitHeaderHeights: true,
hilites: hiliteArray,
autoFitFieldWidths: false,
wrapCells: true,
fixedRecordHeights: false,
/* Data manipulation */
showAllRecords: true,
autoFetchData: false,
autoSaveEdits: false,
canEdit: false,
editEvent: "doubleClick",
listEndEditAction: "next",
enterKeyEditAction: "nextRow",
escapeKeyEditAction: "done",
validateOnChange: true,
modalEditing: true,
selectionType: "single",
fields: [
..................
{
name: "quantity",
title: "Utrošak",
align: "right",
width: "10%",
//type: "float", --comment
type: "localeFloat",
//format: "#,##0.0000", --comment
//format: "#,0000.0000", --comment
//format: "#,####0.0000", --comment
//format: "0.0000", --comment
decimalPrecision: 4
},
..................
]
})
The problem is that I have to use localeFloat type because of comma separator. Float type uses dot sperator and this not suit my needs. Also all rows for this decimal field have to had 4 decimal places, including zeros. When the grid is populated with data (warehouseOperationItemsGrid.setData()) decimal format is OK, all rows have 4 decimal places. But the problem is when I start editing list grid row. Last 2 decimal places are cut off. For example if in the row is value: 1,2345 and I start editing row, edit value is 1,23 (4 and 5 are not present). Why is this happening? Documentation says that property decimalPrecision is only used with type float, but with float I can't use comma decimal separator. Any suggestions?
I'm using SmartClient version 10.0. on Google Chrome. JavaScript errors are not present.
My ListGrid config looks like:
isc.NumberUtil.addClassProperties({ groupingFormat: 1, groupingSymbol: ".", decimalSymbol: ",", decimalPrecision: 4 });
isc.ListGrid.create({
ID: "warehouseOperationItemsGrid",
/* Customize look */
canResizeFields: true,
alternateRecordStyles: true,
wrapHeaderTitles: true,
autoFitHeaderHeights: true,
hilites: hiliteArray,
autoFitFieldWidths: false,
wrapCells: true,
fixedRecordHeights: false,
/* Data manipulation */
showAllRecords: true,
autoFetchData: false,
autoSaveEdits: false,
canEdit: false,
editEvent: "doubleClick",
listEndEditAction: "next",
enterKeyEditAction: "nextRow",
escapeKeyEditAction: "done",
validateOnChange: true,
modalEditing: true,
selectionType: "single",
fields: [
..................
{
name: "quantity",
title: "Utrošak",
align: "right",
width: "10%",
//type: "float", --comment
type: "localeFloat",
//format: "#,##0.0000", --comment
//format: "#,0000.0000", --comment
//format: "#,####0.0000", --comment
//format: "0.0000", --comment
decimalPrecision: 4
},
..................
]
})
The problem is that I have to use localeFloat type because of comma separator. Float type uses dot sperator and this not suit my needs. Also all rows for this decimal field have to had 4 decimal places, including zeros. When the grid is populated with data (warehouseOperationItemsGrid.setData()) decimal format is OK, all rows have 4 decimal places. But the problem is when I start editing list grid row. Last 2 decimal places are cut off. For example if in the row is value: 1,2345 and I start editing row, edit value is 1,23 (4 and 5 are not present). Why is this happening? Documentation says that property decimalPrecision is only used with type float, but with float I can't use comma decimal separator. Any suggestions?
Comment