Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK Previous
-
None
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Browser: Firefox 3.x
Language Found: English
Description
Steps to reproduce:
1. Create a DataGrid with two states(States A and B) and at least two columns(Columns X and Y). The width of the data grid in State A must be small enough that the column header would be forced to wrap. State B must have the headers shown and State A must have them hidden. Column A must exist in all states and column B must be excluded from State A.
In the example, Product is state A and Supplier is state B. DataGridColumn Supplier is Column A, and DataGridColumn Model Number is Column B.
<mx:DataGrid left="0" top="0" width="100%" height="100%" id="pickerListDG" editable="false" dataProvider="{_workingSet}" showHeaders.Product="true" showHeaders.Supplier="false">
<mx:columns>
<mx:DataGridColumn headerText="Supplier" dataField="supplier"/>
<mx:DataGridColumn headerText="Model Number" dataField="modelNumber" excludeFrom="Supplier"/>
</mx:columns>
</mx:DataGrid>
2. Attempt to run the sample code and note the crash. "Cannot access a property or method of a null object reference." from DataGridBase.columnHeaderWordWrap
Actual Results:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.controls.dataGridClasses::DataGridBase/http://www.adobe.com/2006/flex/mx/internal::columnHeaderWordWrap()
at mx.controls.dataGridClasses::DataGridItemRenderer/validateProperties()
at mx.managers::LayoutManager/validateClient()
at mx.controls.dataGridClasses::DataGridHeader/updateDisplayList()
at mx.core::UIComponent/validateDisplayList()
at mx.managers::LayoutManager/validateDisplayList()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()
Expected Results: Column Supplier should appear without a header in the Supplier state, and Columns Supplier and Model Number should appear with headers in the Product state.
Workaround (if any): Allowing all columns to exist in all states, showing headers in all states, or hiding headers in all states.