8 Replies Latest reply on Oct 10, 2012 10:09 PM by megharajdeepak

    Datagrid Error cannot convert mx.controls::DataGrid@cce80a1 to mx.controls.DataGrid.

    Natthavat

      I got this error when loadmodule via ModuleLoader.

       

      I have 10 Module as a menu (10 Menu)  but it's happen when I load module no.5 (on first time it no error) and then load other module that not no.5 but if I load any module that not no.5 and then load no.5 it's ok

       

      all coding is the same pattern, same syntax nothing difference

       

      it working like this...

       

      1. - Init Module (do some method)

      2. - CreateComplete (calling data from WebService)

      3. - Web Service Get Data Complete

      4. - Bind data from Web Service to Datagrid as ArrayCollection

      5. - Completed (Wait for user action from UI)

       

      this error happen before step 1

       


      and this is completed error message:

       

      TypeError: Error #1034: Type Coercion failed: cannot convert mx.controls::DataGrid@cce80a1 to mx.controls.DataGrid.
          at mx.controls.dataGridClasses::DataGridItemRenderer/validateProperties()[C:\autobuild\3.2.0 \frameworks\projects\framework\src\mx\controls\dataGridClasses\DataGridItemRenderer.as:398 ]
          at mx.managers::LayoutManager/validateClient()[C:\autobuild\3.2.0\frameworks\projects\framew ork\src\mx\managers\LayoutManager.as:811]
          at mx.controls::DataGrid/http://www.adobe.com/2006/flex/mx/internal::calculateHeaderHeight()[C:\autobuild\3.2.0\fra meworks\projects\framework\src\mx\controls\DataGrid.as:1848]
          at mx.controls.dataGridClasses::DataGridHeader/measure()[C:\autobuild\3.2.0\frameworks\proje cts\framework\src\mx\controls\dataGridClasses\DataGridHeader.as:140]
          at mx.core::UIComponent/measureSizes()[C:\autobuild\3.2.0\frameworks\projects\framework\src\ mx\core\UIComponent.as:5956]
          at mx.core::UIComponent/validateSize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\ mx\core\UIComponent.as:5902]
          at mx.managers::LayoutManager/validateSize()[C:\autobuild\3.2.0\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:579]
          at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects \framework\src\mx\managers\LayoutManager.as:668]
          at Function/http://adobe.com/AS3/2006/builtin::apply()
          at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framew ork\src\mx\core\UIComponent.as:8628]
          at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8568]