1 Reply Latest reply on Mar 14, 2007 4:09 PM by upshotvideo

    itemCLick on DataGrid

    upshotvideo Level 1
      I want to be able to change the ArrayCollection data when a user click on a cell of a datagrid. Im using the itemClick event and am able to trace the columnIndex and the rowIndex of that ListEvent. I'm trying to use this info to change the dataprovider data but im not having any luck. I can use the columnIndex to get the right index of my arrayCollection, but how do i get to the property of that object to change its value? Is there a way to get the name of the item you clicked?

      here is my function that is called from a itemClick event in a datagrid --- itemClick = temClickEvent(event)

      private function itemClickEvent(event:ListEvent):void {
      var columnIndex:Number = event.columnIndex;
      var rowIndex:Number = event.rowIndex - 1;
      myDataProvider[rowIndex][columnIndex]="clicked" //Can not access property this way with ArrayCollection
      How do i access the 'name' of the item clicked?