You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "moketing (JIRA)" <ji...@apache.org> on 2014/11/26 11:06:12 UTC
[jira] [Closed] (FLEX-34647) DataGrid columns Can't initialize by
ActionScript
[ https://issues.apache.org/jira/browse/FLEX-34647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
moketing closed FLEX-34647.
---------------------------
Resolution: Duplicate
Ooo,my old version DataGridSkin fault!
> DataGrid columns Can't initialize by ActionScript
> -------------------------------------------------
>
> Key: FLEX-34647
> URL: https://issues.apache.org/jira/browse/FLEX-34647
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: DataGrid
> Affects Versions: Apache Flex 4.12.0, Apache Flex 4.13.0
> Environment: win8 ,flashBuilder4.7 ,Apache Flex SDK4.13, Adobe Air
> Reporter: moketing
>
> DataGrid columns Can't initialize from actionscript,but mxml work fine!
> code below do not show the columns been add!
> <?xml version="1.0" encoding="utf-8"?>
> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:mx="library://ns.adobe.com/flex/mx"
> creationComplete="_creationCompleteHandler(event)">
> <fx:Script>
> <![CDATA[
> import mx.collections.ArrayList;
> import mx.events.FlexEvent;
>
> import spark.components.gridClasses.GridColumn;
>
> protected function _creationCompleteHandler(event:FlexEvent):void
> {
> var cols:ArrayList = new ArrayList();
> for(var i:int=0;i<6;i++)
> {
> var col:GridColumn = new GridColumn();
> col.dataField="value";
> col.headerText="Column"+i;
> cols.addItem(col);
> }
> dataGrid.columns = cols;
> }
>
> ]]>
> </fx:Script>
> <fx:Declarations>
> </fx:Declarations>
>
> <fx:Declarations>
> </fx:Declarations>
> <s:DataGrid id="dataGrid" verticalCenter="0" horizontalCenter="0" requestedRowCount="4" requireSelection="true"/>
> </s:WindowedApplication>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)