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

RadCombobox editable search Focus change

6 Answers 155 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Varun
Top achievements
Rank 1
Varun asked on 20 Aug 2013, 06:49 AM
Hi, 

I have a Radcombobox mentioned below propertis, once selected the value in the combobox need change the focus to the next item, or need to remove edit property. I am looking for helps and suggestions.

telerik:RadComboBox x:Name="radComboContacts" Grid.Column="5" IsEnabled="{Binding Path=IsEnabled}" 
                    ItemsSource="{Binding Path=Contacts}" SelectedItem="{Binding Path=Contact, Mode=TwoWay}"
                    DisplayMemberPath="Email" SelectedValuePath="ID" 
                    HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="0" IsEditable="True" IsFilteringEnabled="True" OpenDropDownOnFocus="True" CanAutocompleteSelectItems="False" StaysOpenOnEdit="False"

Thanks in Advance for the help or suggestions... 

Varun

6 Answers, 1 is accepted

Sort by
0
Accepted
Kalin
Telerik team
answered on 20 Aug 2013, 01:51 PM
Hi Varun,

In order to make the ComboBox not editable when an Item is selected you could use the SelectionChanged event and set the IsEditable property to false in the handler.

I hope this will work for you. If you have any other questions let us know.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Varun
Top achievements
Rank 1
answered on 21 Aug 2013, 07:02 AM
Hi Kalin,

I used SelectionChanged, event to change focus. Thank you for the response and it worked. Now I am having another issue, needs help from  you and telerik Team.

I am using IsEditable = True is in order to allow user to search(editable). Now I edited(added a letter) my combo-box without selection(selecting value from drop-down list), now I am coming back and adds any letter then combo-box going with first element binding. I don't want this happen until user selects.

Thanks in advance.

Varun



0
Kalin
Telerik team
answered on 21 Aug 2013, 03:08 PM
Hi Varun,

As far as I understand the situation this behavior is probably caused because the CanAutocompleteSelectItems property work only when the drop down is open. I assume that when you continue typing in the input field the drop down is closed and the ComboBox auto completes and auto selects the word which matches. However when loses the focus the text in the input should be cleared, so if change the focus and go back shouldn't be a problem.

Hope this helps. If you have any other concerns let us know.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Varun
Top achievements
Rank 1
answered on 26 Aug 2013, 06:58 AM
Hi Kalin

Thanks for your reply.Here is my combo-box code here.
<telerik:RadComboBox x:Name="radComboContacts" Grid.Column="5" IsEnabled="{Binding Path=IsEnabled}" <br>                    ItemsSource="{Binding Path=Contacts}" SelectedItem="{Binding Path=Contact, Mode=TwoWay}"<br>                    DisplayMemberPath="Email" SelectedValuePath="ID" CanKeyboardNavigationSelectItems="True" <br>                    HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="0" IsEditable="True" IsFilteringEnabled="True" SelectAllTextEvent="None"<br>                    OpenDropDownOnFocus="True" CanAutocompleteSelectItems="False" StaysOpenOnEdit="True">

It has "CanAutocompleteSelectItems" is False. 
Eventhough if user select the combobox and left the combobox without selecting, coming back and hit single letter binding is happening for the first field from the combbobox selection.

We just want to avoid the first selection, instead a filtering for the word entered.

Please help me on this. Thanks in advance.....

0
Accepted
Kalin
Telerik team
answered on 26 Aug 2013, 11:30 AM
Hello Varun,

We are not sure if we have recreated the described scenario correctly, so could you please provide more information about the binding you have mentioned and also which version of controls you are using in the project? I have recorded and attached here a video showing our tests and you can also find the sample project in the attachments. Could you please check them and let us know if we are missing something or if you could modify the sample project and send it back to us that would be really helpful.

I'm looking forward to your response.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Varun
Top achievements
Rank 1
answered on 26 Aug 2013, 12:37 PM
Hi Kalin,

Thank you for your time and help. And Thanks for sending code, and video.  I could not replicate the scenario in your sample project.

I don't have a "SelectionChanged" method, instead we are binding in the collection.

I resolved my issue now by adding two triggers, and all the time I will re point from original radcombobox to a different so that I can avoid rebinding.These are my triggers. The problem solved for now, may not be in the right way. I shall post you about the details of binding by tomorrow. Thanks a lot taking time to help me.

<i:Interaction.Triggers>
                        <i:EventTrigger EventName="SelectionChanged">                            
                            <local:SetFocusTrigger TargetName="ComboTeam"/>
                        </i:EventTrigger>
                        <i:EventTrigger EventName="DropDownClosed">
                            <local:SetFocusTrigger TargetName="ComboTeam"/>
                        </i:EventTrigger>                        
                    </i:Interaction.Triggers>

Thanks Kalin.


Tags
ComboBox
Asked by
Varun
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Varun
Top achievements
Rank 1
Share this question
or