Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34132

DataGrid columns with no dataField specified gives "[object Object]"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Apache Flex 4.12.0
    • Apache Flex 4.12.1
    • ADG:Display
    • None

    Description

      This is a regression from 4.11. It a minor issue but as it is 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.

      <?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>

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

      Attachments

        Activity

          People

            jmclean Justin Mclean
            jmclean Justin Mclean
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: