Click here to Skip to main content
16,019,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear sir,
when i enter character , charater based list Items has to display.

For example { apple, orange, banna, grape, ,zebra}
when i type a charater "G" in my combobox in first row i have to get letters starting with "G", but rather that my cursor going to grape's position, like bottom when i entered "Z" .




XML
<%@ Page Title="" Language="C#" MasterPageFile="~/InnerHome.Master" AutoEventWireup="true" CodeBehind="AutoCompletDemo.aspx.cs" Inherits="MOSS.AutoCompletDemo" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <asp:ComboBox ID="ComboBox1" runat="server" AutoCompleteMode="SuggestAppend"  CaseSensitive="false"
     >
    </asp:ComboBox>
</asp:Content>




private void FillDdl()
       {
           DataTable dt = new DataTable();
           dt = BLAutoComplete.getDdlDetails();

           ComboBox1.DataSource = dt;
           ComboBox1.DataTextField = "CategoryName";
           ComboBox1.DataValueField = "CategoryId";
           ComboBox1.DataBind();
           

       }
Posted
Updated 27-Sep-10 3:22am
v2

1 solution

Looks like you are looking for this control: AutoComplete control[^]
 
Share this answer
 
Comments
karthikkushala 28-Sep-10 2:17am    
no for a dropdown i need Auto Complete my code works but after binding a dataset i have to sort according to text entered

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900