1 Reply Latest reply on Feb 19, 2012 1:58 PM by jhapak

    Same values in DataGrid causes selection problem

    jhapak Level 1

      Hi all,

      When I have a column in DataGrid with the same values, it only allows to select the last placed item. Is there any way to fix this problem. I am creating a new object everytime but I am now sure why DataGrid is giving problem.



      Thanks in advance. Below is the sample code:




      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"


                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"



              <!-- Place non-visual elements (e.g., services, value objects) here -->





                  import mx.collections.ArrayCollection;

                  import mx.containers.Canvas;



                  private var canvasList:ArrayCollection = new ArrayCollection();


                  private function init():void


                      var c:Canvas;


                      for (var i:int=0; i < 10; i++)


                          c = new Canvas();

                          c.name = "adsf";








          <mx:DataGrid id="fillersDataGrid" dataProvider="{canvasList}">


                  <mx:DataGridColumn dataField="name" headerText="Name"/>