zoukankan      html  css  js  c++  java
  • 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;

    四. 检索效果

      检索前:

      检索后:

  • 相关阅读:
    抽象工厂模式详解
    工厂方法模式详解
    简单工厂模式详解
    在IDEA中如何初始化Git,把项目推送到Git上
    Git报错解决:git@gitee.com: Permission denied (publickey).
    我为什么写博客?
    写什么样的博文
    Python装饰器的一点解读
    Python下将一般对象打印成Json
    众数的算法分析
  • 原文地址:https://www.cnblogs.com/Resources-blogs/p/6611180.html
Copyright © 2011-2022 走看看