ASP .NET 可編輯,輸入自動匹配選項的下拉框


一. 引用dll文件

二. aspx前台頁面應用該控件

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>

    小區:
                <telerik:RadComboBox RenderMode="Lightweight" ID="DropDownList1" AllowCustomText="true" AutoPostBack="True" runat="server" Width="110px" Height="400px"
     EmptyMessage="請輸入小區名稱" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" OnItemsRequested="DropDownList1_ItemsRequested" MarkFirstMatch="true" EnableLoadOnDemand="true"
            HighlightTemplatedItems="true" DropDownCssClass="exampleRadComboBox">
                </telerik:RadComboBox>

三. aspx.cs文件給下拉框綁定下拉選項數據

    this.DropDownList1.DataSource = (new BLL_TArea()).GetAllAreaInfo();
           this.DropDownList1.DataTextField = "AREANAME";
           this.DropDownList1.DataValueField = "AREAGUID";
           this.DropDownList1.DataBind();
           DropDownList1.Items.FindItemByValue(BaseClass.Utility.Cookie.GetCookie("AreaGuid")).Selected = true;

 

四. 檢索效果

  檢索前:

  檢索后:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM