This is a migrated thread and some comments may be shown as answers.

Issue with autoComplete extender and radtxtbox

3 Answers 157 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Gina
Top achievements
Rank 1
Gina asked on 19 May 2009, 02:40 PM
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();
    }


3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 22 May 2009, 10:01 AM
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.
0
Carl-Johan
Top achievements
Rank 1
answered on 04 Jan 2010, 06:32 AM
Hi, is there an example how to accomplish this (and other extenders) by using javascript?
0
Georgi Krustev
Telerik team
answered on 07 Jan 2010, 01:54 PM
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.
Tags
Ajax
Asked by
Gina
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Carl-Johan
Top achievements
Rank 1
Share this question
or