Issue with autoComplete extender and radtxtbox

4 posts, 0 answers
  1. Gina
    Gina avatar
    25 posts
    Member since:
    Jun 2007

    Posted 19 May 2009 Link to this post

    I am trying to use a RadTextBox with an ajax-AutoCompleteExtender. However the list  does not return. If I use an asp textbox it works fine. Can someone tell me why I am unable to use a RadTextBox ? ior Am I missing something ?

    Here is the code :
      <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
     <asp:Label ID="lblRepName" runat="server" Text="Agent:" CssClass="LblName"
            Width="110px"></asp:Label>  
       <telerik:RadTextBox ID="txtRepName" runat="server" AutoPostBack="True"  ontextchanged="txtRepName_TextChanged">
            </telerik:RadTextBox>
        <ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtRepName"
            ServicePath="~/WebServices/ESFS_Autocomplete.asmx" ServiceMethod="GetNames" MinimumPrefixLength="2"
            CompletionSetCount="15">
        </ajaxToolkit:AutoCompleteExtender>   


        here is what i have for the event handler:
       protected void txtRepName_TextChanged(object sender, EventArgs e)
        {
            //string test = txtRepName.Text.Replace(", ", "~");

            // change name from last, first to last~first       
            string reverseName = "";

            string fullName = txtRepName.Text;
            //string fullName = ddlRepName.SelectedValue;

            // txtRepName is Last, First name this will split at the ,
            // and reverse to be First~Last name
            string[] splName = fullName.Split(',');

            if (splName.Length > 0)
            {
                string Name = splName[1] + "~" + splName[0];
                reverseName = Name.Trim();
            }
            else
            {
                Response.Write("Error with Name: " + reverseName);
            }

            // look up login by First~Last name
            //EmployeeSearchBy is a method where you can look up by Name, Login, CSG login
            //email, Icoms login, ESSID, SalesID and Phone login
            //ActiveDirectoryBase ad = new ActiveDirectoryBase(reverseName, EmployeeSearchBy.Name);        
            SAIDEmployee sdUser = new SAIDEmployee("EmployeeConnectString", reverseName, EmployeeSearchBy.Name);

            _login = sdUser.DomainLogin;

            getUserInfo();
        }


  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 22 May 2009 Link to this post

    Hello Gina,

    Unfortunately the requested functionality is not attainable. The AutoCompleteExtender requires TextBox control. Our RadTextBox control does not inherits the TextBox. For further information please refer to this link.

    Best regards,
    Georgi Krustev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Carl-Johan
    Carl-Johan avatar
    22 posts
    Member since:
    May 2008

    Posted 04 Jan 2010 Link to this post

    Hi, is there an example how to accomplish this (and other extenders) by using javascript?
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 07 Jan 2010 Link to this post

    Hi Carl,

    Here is the project which I created in order to test the autocomplete feature of ajax toolkit compatibility with RadTextBox.

    Unfortunately I am not able to suggest you any suitable approach which will cover your needs.

    All the best,
    Georgi Krustev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top