Hi I have an Advanced Datagrid in flex and on occasions the query that populates this graph will return an empty cell value. when this happens the Datagrid displays "NaN". is there anyway that if my query doesn't return anything the Datagrid cell just remains blank.
thanks mxml: '
<mx:AdvancedDataGridColumn headerText="{Mlc.curr.get('address')}" dataField="datafield2" width="{Math.max(180,getStyle('fontSize')))}" />
<mx:AdvancedDataGridColumn headerText="{Mlc.curr.get('Name')}" dataField="datafield1" width="{Math.max(180,getStyle('fontSize')))}" />
</components:columns>
</components:RowColorDataGrid>
'
as:
accountViewGridCanv.numRows = 1000;
dgGridCanv.addParameter(Constants.parameter,"");
dgGridCanv.itemID = displayItems.indexOf(dgGrid);
basically a query runs to a spreadsheet and results are displayed in a datagrid, but if the cell in the spreadsheet is null then the datagrid displays "NaN"
Thanks Again
This happens when the webservice returns null for a Number datatype. Flex converts it into NaN(Not a Number). Use labelfunction to check if the value in the column is NaN or not. If it is, then return appropriate value to display.eg-
now check for NaN in the getTotalQty function