Select to view content in your preferred language

data grid 1069# Error

646
0
03-22-2011 10:52 PM
NadirHussain
Frequent Contributor
Dear All
I am using Flexviewer. I have one widget and here i place data grid on the data grid column i have check boxes.on the check event i write the event handler as a public method.but when the check event fire it throws error #1069.it means it is not finding my event handler.i try my best.but so for not succded.if i dont use flex viewer for widgets this works.but for widgets not work.so how can i call my public event handler in this criteria.pls help.

  <mx:DataGrid id="dgLegend" width="100%"  height="100%"  borderStyle="none"  >
            <mx:columns>
            <mx:DataGridColumn headerText="" width="240"  dataField="label" backgroundColor="white"  />
            <mx:DataGridColumn headerText="" width="130"   textAlign="center" backgroundColor="white" >
            <mx:itemRenderer>
               <mx:Component>


public function cbx_Click(e:Event, issueID:String,systemDescription:String):void
                       {  
                        try
                          {                        if(e.currentTarget.selected)
{
   clickAction("true",systemDescription,cp.selectedColor.toString(16));
}
        else
{
  clickAction("false",systemDescription,cp.selectedColor.toString(16));

              
                          }
                 catch (erObject:Error) { Alert.show(erObject.message.toString());}
                      }
                                    
                                      public function changeEvtPicker(e:Event, issueID:String,systemDescription:String):void
                                   { 
                                      try
                     {
                     clickAction("true",systemDescription,e.currentTarget.selectedItem.toString(16));
                    }
                                         catch (erObject:Error) { Alert.show(erObject.message.toString());}
                                   }
            
           
              ]]>
         </mx:Script>
                     <mx:ColorPicker id="cp" showTextField="true" selectedColor="{data.clr}"  change="changeEvtPicker(event,data.selected,data.label)"/>
      <mx:CheckBox    id="cbxComplete"  selected="{data.selected}"   click="cbx_Click(event,data.selected,data.label)" />
      </mx:HBox>
                  </mx:Component>
                  </mx:itemRenderer>
                  </mx:DataGridColumn>
                  </mx:columns>
                  </mx:DataGrid>
                            
  public  function  clickAction(strTrueFalse:String,strLabel:String,strNewClr:String):void
          {
           Alert.show("i am in click Action:");
                                 }

click action is outside from the script block of datagrid.how to call this. in widget enviornment.
Tags (2)
0 Kudos
0 Replies