[
https://issues.apache.org/jira/browse/FLEX-35028?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Judah Frangipane updated FLEX-35028:
------------------------------------
Description:
When using a DataGrid if you click the header and the column index is -1 then
an error is thrown:
{code=actionscript}
public function getHeaderRendererAt(columnIndex:int):IGridItemRenderer
{
// TODO: fix this: do the work here, rather than the layout
const view:Group = getColumnHeaderViewAtIndex(columnIndex);
return
GridHeaderViewLayout(view.layout).getHeaderRendererAt(columnIndex);
}
{code}
view is null
Solution may be to check if index is not -1 and return null if it is
was:
When using a DataGrid if you click the header and the column index is -1 then
an error is thrown:
[code=actionscript]
public function getHeaderRendererAt(columnIndex:int):IGridItemRenderer
{
// TODO: fix this: do the work here, rather than the layout
const view:Group = getColumnHeaderViewAtIndex(columnIndex);
return
GridHeaderViewLayout(view.layout).getHeaderRendererAt(columnIndex);
}
[code]
view is null
Solution may be to check if index is not -1 and return null if it is
> Error in DataGrid getHeaderRendererAt(-1)
> -----------------------------------------
>
> Key: FLEX-35028
> URL: https://issues.apache.org/jira/browse/FLEX-35028
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: DataGrid
> Reporter: Judah Frangipane
>
> When using a DataGrid if you click the header and the column index is -1 then
> an error is thrown:
> {code=actionscript}
> public function getHeaderRendererAt(columnIndex:int):IGridItemRenderer
> {
> // TODO: fix this: do the work here, rather than the layout
>
> const view:Group = getColumnHeaderViewAtIndex(columnIndex);
> return
> GridHeaderViewLayout(view.layout).getHeaderRendererAt(columnIndex);
> }
> {code}
> view is null
> Solution may be to check if index is not -1 and return null if it is
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)