You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2014/03/11 06:59:42 UTC

[jira] [Created] (FLEX-34132) DataGrid columns with no dataField specified give "[object Object]"

Justin Mclean created FLEX-34132:
------------------------------------

             Summary: DataGrid columns with no dataField specified give "[object Object]"
                 Key: FLEX-34132
                 URL: https://issues.apache.org/jira/browse/FLEX-34132
             Project: Apache Flex
          Issue Type: Bug
          Components: ADG:Display
    Affects Versions: Apache Flex 4.12.0
            Reporter: Justin Mclean


This is a regression from 4.11. It a minor issue but as it a regression I put it at major.

A ADG column with no dataField and no data renderer defined will display "[object Object]". It would display blank in 4.11 and earlier.

{code}
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx">
	<fx:Script>
		<![CDATA[
			import mx.collections.ArrayCollection;

			[Bindable]
			protected var data:ArrayCollection = new ArrayCollection([
				{name:"Person A"},
				{name:"Person B"},
				{name:"Person C"}
			]);
		]]>
	</fx:Script>
	
	<mx:AdvancedDataGrid dataProvider="{data}">
		<mx:columns>
			<mx:AdvancedDataGridColumn  />
			<mx:AdvancedDataGridColumn />
			<mx:AdvancedDataGridColumn />
		</mx:columns>
	</mx:AdvancedDataGrid>
	
</s:Application>
{code}

Work around is to define the dataField, add a labelFuction, add a toString method to the object or use a real item renderer.



--
This message was sent by Atlassian JIRA
(v6.2#6252)