[
https://issues.apache.org/jira/browse/FLEX-33824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13797609#comment-13797609
]
Alex Harui commented on FLEX-33824:
-----------------------------------
A workaround appears to be:
private function view1AddedToStageHandler(event:Event):void
{
event.target.grid.dataProvider = new ArrayCollection();
event.target.grid.dataProvider.addItem({text1: "Piotr", text2:
"Zarzycki"});
if (event.target.grid.columnHeaderGroup)
{
event.target.grid.validateNow();
event.target.grid.columnHeaderGroup.invalidateProperties();
event.target.grid.columnHeaderGroup.invalidateSize();
event.target.grid.columnHeaderGroup.invalidateDisplayList();
}
}
> Disappearing spark DataGrid columns when we set dataProvider to null
> --------------------------------------------------------------------
>
> Key: FLEX-33824
> URL: https://issues.apache.org/jira/browse/FLEX-33824
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: DataGrid
> Affects Versions: Apache Flex 4.10.0
> Environment: Windows 7 64bit, Adobe Air 2.6
> Reporter: Piotr Zarzycki
> Assignee: Alex Harui
>
> This is an example of an application with problems we have noticed on our
> main appliaction.
> Instructions:
> We've got 2 views added dynamically to app.
> 1) Click on button "View 1" - DataGrid looks Ok (fill dataProvider on
> ADDED_TO_STAGE event)
> 2) Click on button "View 2" - DataGrid still looks Ok (set null to View 1's
> dataProvider on REMOVED_FROM_STAGE event)
> 3) Click once again on button with "View 1" - Columns in DataGrid
> accidentally disappear) -> http://bit.ly/GORcrb
> 4) Roll over on data grid's header and everything is back to normal - columns
> appearing
> Link to example app (zip, Intellij IDEA project) -> http://bit.ly/16cOemT
--
This message was sent by Atlassian JIRA
(v6.1#6144)