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

finding the selected item on pressing enter

1 Answer 36 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
adam_right
Top achievements
Rank 1
adam_right asked on 22 Oct 2010, 03:23 AM


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 ? 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 28 Oct 2010, 07:23 AM
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
Tags
ComboBox
Asked by
adam_right
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or