finding the selected item on pressing enter

2 posts, 0 answers
  1. adam_right
    adam_right avatar
    7 posts
    Member since:
    May 2007

    Posted 21 Oct 2010 Link to this post



    the control
    <telerik:RadComboBox ID="RadComboBox3" runat="server" Width="500px" Height="150px" Skin="Hay"
                    OnClientSelectedIndexChanged="catchSelected" ChangeTextOnKeyBoardNavigation="false"
                    Filter="Contains" EnableAutomaticLoadOnDemand="true"
                    EmptyMessage="Chose a product.." ShowMoreResultsBox="true" ItemsPerRequest="10" ExpandAnimation-Type="InQuad"
                    EnableVirtualScrolling="true">
                    <WebServiceSettings Method="GetProductNames" Path="Products.asmx" />
                </telerik:RadComboBox>

    and the client function:
    function catchSelected(sender, evntArgs) 
            {
                var cmb = $telerik.findComboBox('RadComboBox3');
                var chosen = cmb.get_selectedItem();
                if (chosen) {
                    alert(chosen.get_text());
                }
            }


    The problem:
    i can not determine the selected item if user presses "enter key" on an item, instead of clicking the mouse on that item.
    because when ChangeTextOnKeyBoardNavigation is false, Combobox does not change the input box.

    do you know how can i find the selected item on pressing the enter key when ChangeTextOnKeyBoardNavigation is false ? 
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 28 Oct 2010 Link to this post

    Hi Adam,

    I tried to reproduce this issue but to no avail - chosen.get_text() returns the text of the item. Can you send us more details which will help us observe the problem? Thanks in advance

    All the best,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top