【问题标题】:Flex : How to link data to a datagrid?Flex:如何将数据链接到数据网格?
【发布时间】:2010-06-09 16:41:33
【问题描述】:

我正在关注 flex 教程,但我没有完全按照他们的做法做,所以:

我想要什么

我有一个输入文本,带有一个“搜索”按钮。

我希望当点击此按钮时,函数搜索返回的数据显示在数据网格中。

我有什么:

文本输入:

<s:TextInput includeIn="DetailServeurs" x="58" y="361" width="209" id="txt_search" text="Default text" focusIn="txt_search_focusInHandler(event)"/>

一个搜索按钮:

<s:Button includeIn="DetailServeurs" x="275" y="361" label="Rechercher" id="btn_rechercher" click="btn_rechercher_clickHandler(event)"/>

此搜索按钮的点击处理程序:

protected function btn_rechercher_clickHandler(event:MouseEvent):void
        {
            if(txt_search.text != ""){
                getServeurByNameResult.token = serveurService.getServeurByName(txt_search.text);
            }
        }

和一个数据网格:

<mx:DataGrid includeIn="DetailServeurs" x="30" y="124" width="1002" height="179" id="dataGrid" dataProvider="{getServeurByNameResult.lastResult}">
    <mx:columns>
        <mx:DataGridColumn headerText="GSP_nom" dataField="GSP_nom"/>
        <mx:DataGridColumn headerText="port" dataField="port"/>
               ........
    </mx:columns>
</mx:DataGrid>

那么如何在数据网格中显示结果?谢谢 ! ;)

【问题讨论】:

    标签: apache-flex datagrid flex4 flash-builder


    【解决方案1】:

    问题解决了。我不能告诉你确切的原因,但我得到了帮助。

    【讨论】:

      猜你喜欢
      • 2011-04-29
      • 1970-01-01
      • 2011-07-23
      • 2013-03-25
      • 1970-01-01
      • 2014-08-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多