0

我正在关注 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>

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

4

1 回答 1

0

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

于 2010-06-10T00:34:50.213 回答