how to change textbox into drop down list in dynamicData filtering

Nov 6, 2008 at 6:38 AM

hi, i got a problem of my dynamicFilter always being a textbox, where i wan it to be a dropdownlist.

after reading the forum + seeing some samples, i think the control should be controlled by FilterUserControl.ascx. However, i check that control, i am having a dropdownlist inside that control.

<%@ Control Language="C#" CodeBehind="FilterUserControl.ascx.cs" Inherits="BudgetModule.FilterUserControl" %>

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" EnableViewState="true" CssClass="droplist">
    <asp:ListItem Text="All" Value="" />

lets look at my aspx:

<asp:DynamicFilterRepeater ID="DynamicFilterRepeater" runat="server" DataSourceID="GridDataSource">          
                            <td colspan="2">Search</th>
                        <td><asp:Label ID="Label1" runat="server" Text='<%# Eval("DisplayName") %>' />
                        <td><asp:DynamicFilterControl runat="server" ID="DynamicFilter"   ></asp:DynamicFilterControl>
                            <td colspan="2" align="center">
                                <asp:LinkButton ID="LinkButton1" runat="server" Text="Search" CommandName="Search" />
                                <asp:LinkButton ID="LinkButton2" runat="server" Text="Clear" CommandName="Clear" />

i was wondering do i need have some sort of AssociatedControlID method called on the aspx inorder to make the dynamicFilterControl into a drop down list, instead of currently a textbox?

I am very confused over this matter, hope someone could give me a gd suggestion in how to fix this problem. thanks