1 Reply Latest reply on Apr 19, 2011 10:08 PM by Subeesh Arakkan

    Datagrid column that contains checkbox erroring

    sensomage5 Level 1

      Hi i'm trying to set the selected option on a checkbox in a datagrid column but i keep getting the error "Access to undefined property data".  Can someone shead some light on how i can fix this?  The code i have is below.

       

      Thanks in advance....

       

      <mx:DataGrid x="140" y="85" width="596" height="294" id="rankGrid" dataProvider="{dp}" doubleClick="updRank();" doubleClickEnabled="true">

      <mx:columns>

      <mx:DataGridColumn headerText="Court" dataField="court"/>

      <mx:DataGridColumn headerText="Team One" dataField="level"/>

      <mx:DataGridColumn headerText="Checked In" dataField="chkdInOne">

      <mx:itemRenderer>

      <fx:Component>

      <s:CheckBox selected="{data.chkdInOne}" click="outerDocument.checkInTeamOne()" />

      </fx:Component>

      </mx:itemRenderer>

      </mx:DataGridColumn>

       

      <mx:DataGridColumn headerText="Team One" dataField="teamonedesc"/>

      <mx:DataGridColumn headerText="Checked In" dataField="chkdInTwo">

      <mx:itemRenderer>

      <fx:Component>

      <s:CheckBox click="outerDocument.checkInTeamTwo()" selected="{data.chkdInTwo}"/>

      </fx:Component>

      </mx:itemRenderer>

      </mx:DataGridColumn>

      <mx:DataGridColumn headerText="Team Two" dataField="teamtwodesc"/>

      </mx:columns>

      </mx:DataGrid>