tags:

views:

35

answers:

2
private function editForm():void {
       var event:DepManagementEvent = new DepManagementEvent("Edit Page",true);
       var navi:String;
       event.navi = deleteDataGrid.selectedItem
       dispatchEvent(event);
      }

This function is in item renderer, i need the parent datagrid id to be called here...

+1  A: 

DataGrid(this.owner) or DataGrid(this.listData.owner) would give you the parent data grid. I don't know the exact reasons, but I heard that the second one is the preferred way of doing it.

Amarghosh
you're right, the second way is the preferred way of doing it. Also remember that the itemRenderer needs to implement IDropInListItemRenderer; many Containers don't, while many components do.
Luis B
The first way will work in case of containers that don't implement the interface, right? Do you know of any specific reason why this.owner is not preferred - any problems that we might run into by using it?
Amarghosh
@theBand Did this work as you wanted it to?
Amarghosh
A: 

Some helpful information here:

http://www.adobe.com/devnet/flex/articles/itemrenderers%5Fpt2%5F04.html

Eric Belair