【问题标题】:Flex 3 give DataGrid Data to functionFlex 3 赋予 DataGrid Data 功能
【发布时间】:2009-12-16 14:30:48
【问题描述】:

我在将值从 DataGrid 发送到函数时遇到问题 - 这是我的函数:

私有函数 browseLoc( location:String ):void { Alert.show(location,'信息'); }

现在我有了从 XML 文件接收信息的 DataGrid。一切正常。使用该标签正确显示所有信息:

<mx:Image x="10" y="346" width="157" height="107" scaleContent="true" source="{codeworxx.pages.page[selectedPageIndex].preview}"/>
<mx:Label x="10" y="492" width="157" fontWeight="bold" text="{codeworxx.pages.page[selectedPageIndex].visible}"/>
<mx:Text x="10" y="513" width="157" text="{codeworxx.pages.page[selectedPageIndex].description}"/>
<mx:Button x="10" y="461" label="Visit Website" width="159" click="browseLoc('{codeworxx.pages.page[selectedPageIndex].url}')"/>

按钮除外。函数“browseLoc”中只有文本 {codeworxx.pages.page[selectedPageIndex].url} - 而不是值。我该怎么做?

【问题讨论】:

    标签: apache-flex flex3 adobe


    【解决方案1】:

    问题不是很清楚。可以使用datagrid组件上的itemClick属性读取网格中所选组件上的URL值。在itemClick上可以调用browseLoc方法。

    【讨论】:

      猜你喜欢
      • 2013-08-10
      • 1970-01-01
      • 1970-01-01
      • 2012-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-03
      • 1970-01-01
      相关资源
      最近更新 更多