6 Replies Latest reply on Sep 23, 2011 2:07 PM by Kristin95762

    how to handle [object Object] in textArea (Flex 4.5)

    Kristin95762 Level 1

      Hello

       

      My code:

       

      protected function myDG_selectionChangeHandler(event:GridSelectionEvent):void

      {

                              var selItems:Vector.<Object> = event.currentTarget.selectedItems;

                                                   var numItems:Number = selItems.length;

       

                                                  for (var i:Number = 0; i<numItems; i++)

                                              {

                                                        selectedItemsTA.text = selectedItemsTA.text + selItems[i] + "\n";

                                              }

      }

       

      Currently I'm just trying to make multiple selections in a datagrid and reflect those in a text area control.

       

      My selections just come across as [object Object]. So, obviously I don't know for sure what data is behind that.

       

      It's really not much different from the example here: http://help.adobe.com/en_US/flex/using/WSc2368ca491e3ff923c946c5112135c8ee9e-7fff.html but their textarea is reset to empty each time through, and I'm using a datagrid vs. their list, and of course the event type.

       

      Thanks

       

      Kristin