Hi,
I am trying apply ListGrid cell formatter to be able to custom format user formula columns and leave all other columns intact: https://forums.smartclient.com/forum...-locale-format
I am having problem with column type of boolean and column with displayField set.
Below is showcase example https://www.smartclient.com/smartcli...d=formatValues
with two additional columns added:
	With formatCellValue commented out I have got the following view of G8 and Description:

But with formatCellValue (using return grid.getDefaultFormattedValue()) applied to those columns I got the following:

which is wrong - I am expecting the same format as with formatCellValue not used.
As far as I tested it is working fine applied to other types: date or decimal.
Thanks,
MichalG
							
						
					I am trying apply ListGrid cell formatter to be able to custom format user formula columns and leave all other columns intact: https://forums.smartclient.com/forum...-locale-format
I am having problem with column type of boolean and column with displayField set.
Below is showcase example https://www.smartclient.com/smartcli...d=formatValues
with two additional columns added:
Code:
	
	isc.ListGrid.create({
    ID: "countryList",
    width:500, height:224, alternateRecordStyles:true,
    data: countryData,
    fields:[
        {name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
        {name:"countryName", title:"Country"},
        {name:"independence", title:"Nationhood", type:"date", width: "25%",
            formatCellValue: function (value) {
                if (isc.isA.Date(value)) {
                    return (new Date().getYear() - value.getYear()) + " years ago";
                }
            }
        },
        {name:"area", title:"Area", type:"number",
            formatCellValue: "isc.NumberUtil.format(value, ',0') + ' km²'"
        },
        {name:"member_g8", title:"G8", type:"boolean"
//            ,formatCellValue: "return grid.getDefaultFormattedValue (record, rowNum, colNum)"
        },
        {name:"government", title:"Description", displayField:"article"
//            ,formatCellValue: "return grid.getDefaultFormattedValue (record, rowNum, colNum)"
        }
    ]
})
But with formatCellValue (using return grid.getDefaultFormattedValue()) applied to those columns I got the following:
which is wrong - I am expecting the same format as with formatCellValue not used.
As far as I tested it is working fine applied to other types: date or decimal.
Thanks,
MichalG

Comment