开发者

Flex 4 Drop Down List - bound with data service, how to always keep prompt or add item at index -1 programmatically

I have a drop down list that is bound using an HTTP data service from a database (set up through the wizard, not as a declaration). My drop down list changes the values in my datagrid and I need that "Select One" null value so that users can select everything. Here is my drop down list:

<s:DropDownList id="ddlProducts" width="400" prompt="Select a Product" close="dataGridContentChanging()" creationComplete="ddlProducts_creationCompleteHandler(event)" labelField="Title">  
    <s:dataProvider>  
        <s:AsyncListView list="{GetProductsResult.lastResult}"/>  
   </s:dataProvi开发者_JAVA技巧der>  
</s:DropDownList>

Is there a way to always keep the prompt or to programmatically add a "Select One" to the -1 index of the drop down list?

Any help is apprecitated. Thanks!


setup an all value in ur Database
(any number of ways to do: this if you are using a look up table just add it to the table, if you are pulling from your data table put in a union statement)

then handle the the 'All' value (on click) to put in '%' as ur variable in dataprovider

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜