简体   繁体   中英

Flex 4.5: Custom component doesn't get visible in custom ItemRenderer

I'm developing a dynamic ItemRenderer to edition in line for Spark DataGrid.

With the Click event on Edit button (first column), I'm refreshing the cell's row using grid.invalidateCell(x,y); inside this custom ItemRenderer, in the function prepare , I'm evaluating an 'editing' dynamic property to hide/show (.visible/.includeInLayout) the default Label or Control for edition; I'm not using actually the itemEditor DataGrid's operation, just simulating this functionality.

Everything goes well with standard spark components for edition: TextInput, ComboBox, etc, but custom components (extended from SkinnableContainer) doesn't get visible, just randomically on first row sometimes.

Is there any specific interface that custom components must implement to work inside an ItemRenderer??

The problem was this property: customComponent.includeInLayout; once you set it to false, it has problems to get visible again. I think it's bad idea to use includeInLayout inside an ItemRenderer.

Now I'm working only with.visible=(false/true) and.x coordinate.

Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM