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

Unable to get the selecteditem when tab is clicked

2 Answers 56 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
dharma krovvidi
Top achievements
Rank 1
dharma krovvidi asked on 26 Mar 2010, 07:35 AM
Hi
I m facing an issue regarding radcombo box,that i need to get the selecteditem to be filtered and displayed when i press the tab key for navigation between different radcombos. Can anybody suggest a solution to this...I m using C# code,& IE 8 browser. 

2 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 29 Mar 2010, 12:13 PM
Hi,

You need to press Enter to commit the selection when the filtering is enabled. You cannot override this behavior.

Kind regards,
Valeri Hristov
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.
0
Bilal Azam
Top achievements
Rank 1
answered on 06 Jul 2010, 11:41 PM
I had the exact problem, but couldn't find any solution on the forum.

So, I implemented this feature myself using the keyDown Event =)

    public class PayeeComboBox : RadComboBox  
    {  
        public PayeeComboBox()  
        {  
            KeyDown += PayeeComboBox_KeyDown;  
        }  
 
        void PayeeComboBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)  
        {  
            if (e.Key == System.Windows.Input.Key.Tab)  
            {  
                foreach (var item in this.Items)  
                {  
                    var container = ItemContainerGenerator.ContainerFromItem(item);  
                    if (container != null && ((RadComboBoxItem)container).IsHighlighted)  
                    {  
                        SelectedItem = ItemContainerGenerator.ItemFromContainer(container);  
                        this.Text = ((Payee)this.SelectedItem).AutocompleteName;  
                        return;  
                    }  
                }  
            }  
        }  
    } 

Hope this is helpful to you!

Regards,
Bilal Azam
Tags
ComboBox
Asked by
dharma krovvidi
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Bilal Azam
Top achievements
Rank 1
Share this question
or