You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Konstantin Elstner (JIRA)" <ji...@apache.org> on 2013/11/25 17:43:35 UTC

[jira] [Comment Edited] (FLEX-33824) Disappearing spark DataGrid columns when we set dataProvider to null

    [ https://issues.apache.org/jira/browse/FLEX-33824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13831586#comment-13831586 ] 

Konstantin Elstner edited comment on FLEX-33824 at 11/25/13 4:41 PM:
---------------------------------------------------------------------

A directly related misbehavior still exists in 4.10 and 4.11.
I tried the given workaround but the bugger is getting more strange with the workaround.

If you have 2 views, each has an DataGrid component view and you are switching between this 2 views
the DataGridHeaderColumns are disappearing on readd until I hover it with the mouse.

With the given workaround:
if (event.target.grid.columnHeaderGroup)
{ event.target.grid.validateNow(); event.target.grid.columnHeaderGroup.invalidateProperties(); event.target.grid.columnHeaderGroup.invalidateSize(); event.target.grid.columnHeaderGroup.invalidateDisplayList(); }
}

The DataGrid in view 2 is never shown, but still exists.

I extended the 4.11 DataGrid component with the given solution / Patch from
https://fisheye6.atlassian.com/viewrep/flex-sdk/frameworks/projects/spark/src/spark/components/DataGrid.as?r1=&r2=3e752d9c63682fbe48cc58b27fdc73260376be74

But the DataGrid headers are still disappearing with the second add to stage.

I think it is directly related to this bug, so I do not opened a new ticket.


ps.
A via callLater (after added to stage) function call to:
- grid.validateNow();
and
- columnHeaderGroup.validateNow()

Seems to be a solution for me


was (Author: gdav):
A directly related misbehavior still exists in 4.10 and 4.11.
I tried the given workaround but the bugger is getting more strange with the workaround.

If you have 2 views, each has an DataGrid component view and you are switching between this 2 views
the DataGridHeaderColumns are disappearing on readd until I hover it with the mouse.

With the given workaround:
if (event.target.grid.columnHeaderGroup)
{ event.target.grid.validateNow(); event.target.grid.columnHeaderGroup.invalidateProperties(); event.target.grid.columnHeaderGroup.invalidateSize(); event.target.grid.columnHeaderGroup.invalidateDisplayList(); }
}

The DataGrid in view 2 is never shown, but still exists.

I extended the 4.11 DataGrid component with the given solution / Patch from
https://fisheye6.atlassian.com/viewrep/flex-sdk/frameworks/projects/spark/src/spark/components/DataGrid.as?r1=&r2=3e752d9c63682fbe48cc58b27fdc73260376be74

But the DataGrid headers are still disappearing with the second add to stage.

I think it is directly related to this bug, so I do not opened a new ticket.

> 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)