2 Replies Latest reply on Jul 14, 2009 12:33 PM by Flex harUI

    itemRenderer and button

    RosieGp Level 1

      I'm trying to add a Button in the datagrid using itemRenderer.
      <mx:DataGridColumn headerText="Link" width="80">
      <mx:itemRenderer>
      <mx:Component>
      <mx:Button color="#0276cd" label="Click Me" width="65" height="22"/>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>

       

      At the end of DataGrid definition I have my viewstack:
      <mx:ViewStack id="vs" left="0" right="20" bottom="10" top="62">
      <mx:Canvas label="View 1" width="100%" height="100%">
      </mx:Canvas>
      <local:Test id="vsTest" width="100%" height="100%"/>
      </mx:ViewStack>
      Now thru that button I want to call my Test.mxml component... I tried using click="vs.selectedChild=vsTest" but it throws errors...

       

      1120:Access of undefined property vs.
      1120:Access of undefined property vsTest.

       

      Any help is appreciated...
      Thanks...