简体   繁体   English

Flash CS4 AS3中DataGrid中的组合框

[英]combo box in datagrid in flash cs4 as3

Can some one please direct me to a example where a combo box has been inserted in a datagrid using as3 in CS4. 能否有人指导我举一个例子,其中在CS4中使用as3在数据网格中插入了一个组合框。 I have a idea that it can be done using the cellrenderer, but i am not able to figure out how to achieve it. 我有一个想法,可以使用cellrenderer来完成,但是我不知道该如何实现。 i tried searching on net but could not find any working example. 我尝试在网上搜索,但找不到任何有效的示例。 I am working on a project where there are mutiple rows in the datagrid, and the values of the datagrid item can be changed using the combo box inside it. 我正在一个项目中,在datagrid中有多个行,并且可以使用其中的组合框更改datagrid项的值。 I have just started on actionscript so not much experience on that part. 我刚开始使用动作脚本,所以那部分经验不足。 I have been searching on net for quite few thing and working them out. 我一直在网上搜索很少的东西并加以解决。 if some one can provide me a simple example of this, that would be gr8. 如果有人可以提供一个简单的例子,那就是gr8。

thanks 谢谢

You will need to do something similar to: 您将需要执行以下操作:

public function createChildren() : void
    {
        combo = createObject("ComboBox", "Combo", startDepth++);

        // Assign the data provider.
        combo.dataProvider = COMBOBOX_DATA_PROVIDER;


        combo.addEventListener(ComboBoxEvent.change, changeEvent);
        combo.addEventListener(ComboBoxEvent.open, openEvent);
    }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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