Hello all, I have a datagrid that I added a button to it. I am having troubles with the button and other things, Here is some code:
public function DoThis(e:DataGridEvent):void { trace(dta.selectedItem.cert;) } <mx:DataGrid x="311" y="208" dataProvider="{dataArrayItemOne}" id="dta"> <mx:columns> <mx:DataGridColumn headerText="Cert Date" dataField="certdate"/> <mx:DataGridColumn headerText="Certification" dataField="cert"/> <mx:DataGridColumn headerText="" dataField="test_id" width="80"> <mx:itemRenderer> <mx:Component> <mx:HBox horizontalAlign="center"> <mx:Button label="Press Me" click="DoThis(event)"/> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid> The first problem is I am getting an error "Call to possibly undefined method DoThis". And can I use the event to trigget the method and get the DataGridEvent? Thanks, timgerr