1 Reply Latest reply on Sep 22, 2009 11:15 AM by paul.williams

    In initializer for 'overrides': type mx.controls.DataGrid is not assignable to target Array element type .

    karnatis

      Hi All,

       

         Designed page with below code which is inside of Canvas

       

      <mx:states>
              <mx:State name="inquiryDetails">
                  <mx:RemoveChild target="{reportLabel}" />
                  <mx:RemoveChild target="{dg}"/>           
                  <mx:AddChild position="lastChild">
                      <components:NewReport id="page2" label="NEW REPORT" xmlns:local="*"/>
                  </mx:AddChild>
              </mx:State>

       


          <mx:State name="inquiryList">   
           <mx:DataGrid id="dg" dataProvider="{BroadModel.resultDG}" width="100%" height="100%" y="43">
              <mx:columns>
                  <mx:DataGridColumn dataField="inquiry_id" headerText="Report Id">
                      <mx:itemRenderer>
                                  <mx:Component>
                                   <mx:Canvas>
                                      <mx:Style>       
                                         .htmlLink       
                                         {
                                                fontSize: 12;
                                                fontWeight: normal;
                                                text-decoration:underline;           
                                           }                      
                                      </mx:Style>

       

                                      <mx:LinkButton styleName="htmlLink" label="{data.inquiry_id}" click="outerDocument.selInquiry(event);" toolTip="Select Inquiry"
                                          rollOver="styleName='htmlLinkHover';"
                                          rollOut="styleName='htmlLink';"/>
                                   </mx:Canvas>                                                   
                                  </mx:Component>
                              </mx:itemRenderer>
                  </mx:DataGridColumn>
                  <mx:DataGridColumn dataField="inquiry_type" headerText="Report Type"/>
                  <mx:DataGridColumn dataField="full_name" headerText="Consumer Name"/>
                  <mx:DataGridColumn dataField="created_date" headerText="Submission Date"/>                     
              </mx:columns>
          </mx:DataGrid>
           <mx:Label id="reportLabel" x="0" y="0" text="Broad Reports" fontSize="18" fontWeight="bold" color="#F07012"/>

       

          </mx:State>
      </mx:states>

       

      Now I'm getting error at red line.

       

      In initializer for 'overrides': type mx.controls.DataGrid is not assignable to target Array element type .

       

        I'm using Flex 3, so can you please let me know how to fix this error. I even removed dataProvider for dataGrid but still it is showing same error.

       

      Thanks,

      Sharath.