RadAutoCompleteBox needs to trigger ASP button.

2 posts, 0 answers
  1. John
    John avatar
    15 posts
    Member since:
    Sep 2012

    Posted 22 Oct 2012 Link to this post

    I have the RadAutoCompleteBox on my page and next to it is a an ASP button.

    <asp:Button ID="LoadReportButton" runat="server" Text="Load Report" OnClick="LoadReportButton_Click" />

    Is there any way when a user selects a value on the drop down and creates a token all they have to do is press enter on the keyboard instead of pressing tab then enter.

    I have it so far when you select an item it fires the function, entry added and displays a pop up saying what you have selected.
    <script type="text/javascript">
        function entryAdded(sender, eventArgs)
            alert("An item with Text='" + eventArgs.get_entry().get_text() + "' has just been selected.");

    I just need a piece of code that highlights the button or even fires the button automatically which would be cool.


    John Moore
  2. Kalina
    Kalina avatar
    918 posts

    Posted 23 Oct 2012 Link to this post

    Hi John,

    I am afraid that the scenario that you want to implement is not supported.

    You can optionally try to focus the button in this way:
    function OnClientEntryAdded(sender, eventArgs) {
            var button = document.getElementById("<%=btnSubmit.ClientID %>").focus();
    <telerik:RadAutoCompleteBox runat="server" OnClientEntryAdded="OnClientEntryAdded"
        ID="RadAutoComplete1" DataSourceID="SqlDataSource1"
        DataTextField="CategoryName" DataValueField="CategoryID">
    <asp:Button ID="btnSubmit" runat="server" Text="Submit" />

    All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top