Datagrid displaying NULL integers as 0
hello,
the data given table displayed in flex datagrid 0 when integer/double has null value. there way display null without making label function every field (with 49 tables , 15/20 fields per table, tedious exercise)? real problem faced null values integers/doubles overwritten 0 value once given row edited. since user still sees same value, none-the-wiser.
in separate form editing, use dg.selecteditem.[fieldname] populate each formitem using labelfunctions not best solution. saving record using current text in each field (converted if necessary).
hopefully enough info , in advance!
calculoso
hi,
datagrid columns has label function = labelfunction="formatnumber"
formatnumber place can format 0 if it's null.
private function formatnumber(item:object, dc:datagridcolumn):string
{
if (item==null)){
return "0";
}else{
return item[dc.datafield] //here can use formatter number if it.
}
}
i hope help.
rgds
johnny
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment