2 Replies Latest reply on Jan 31, 2012 7:27 AM by John Hall

    Datagrid validation error

    John Hall Level 4

      Probably something deep in my application but I thought I'd take a shot to see if anyone recognizes the issue. I have a multi-state component. One state uses a datagrid. I've been testing with real data and all works great. Thought I'd check it when there is no data and it displays but when I go to another state of the component, I get a validation error. Currently, I have the datagrid in all states with the alpha and depth adjusted to hide it to preclude the possibility that the object doesn't exist in any of the states but I still get the following error when the dataprovider is null or the dataprovider is a new ArrayCollection. Any ideas?

      at spark.components.gridClasses::GridLayout/updateTypicalCellSizes()[E:\dev\4.y\frameworks\p rojects\spark\src\spark\components\gridClasses\GridLayout.as:867]

                at spark.components.gridClasses::GridLayout/measure()[E:\dev\4.y\frameworks\projects\spark\s rc\spark\components\gridClasses\GridLayout.as:444]

                at spark.components.supportClasses::GroupBase/measure()[E:\dev\4.y\frameworks\projects\spark \src\spark\components\supportClasses\GroupBase.as:1148]

                at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8506]

                at mx.core::UIComponent/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\ UIComponent.as:8430]

                at spark.components::Group/validateSize()[E:\dev\4.y\frameworks\projects\spark\src\spark\com ponents\Group.as:1012]

                at mx.managers::LayoutManager/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx \managers\LayoutManager.as:665]

                at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:816]

                at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1180]

       

       

      I get no errors specific to my scripts and the line it's bombing on is in GridLayout.as

       

          if (!column.visible)

                  {

                      gridDimensions.setTypicalCellWidth(columnIndex, 0);

                      gridDimensions.setTypicalCellHeight(columnIndex, 0);

                      continue;

                  }

       

      Thanks for any suggestions