3 Replies Latest reply on Mar 8, 2007 3:20 PM by noocleo

    Changing State within Datagrid Not Working

    noocleo
      I have a datagrid with one column containing a linkbutton with the following code:

      <mx:DataGridColumn headerText="Text" textAlign="center" width="70">
      <mx:itemRenderer>
      <mx:Component>
      <mx:LinkButton label="{data.number}" click="currentState='differentstate'"/>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>

      The issue is when the link is clicked an error appears saying the state is undefined. The state is defined and works when referenced with a linkbutton outside the datagrid.

      Is the code to change the state different when within an itemrenderer?

      Thanks.