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

Open combobox column popup in one click

6 Answers 492 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Yaroslav
Top achievements
Rank 1
Yaroslav asked on 21 Feb 2011, 07:56 AM
Hi,
By default you need three clicks to open popup. Using EditTriggers="CellClick" - two clicks.
Is it possible to open combobox popup in one click? (similar as you can change Checkbox column state in one click)

6 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 21 Feb 2011, 08:05 AM
Hi Yaroslav,

You may set an implicit style targeting RadComboBox and set the OpenDropDownOnFocus property to "True":

<UserControl.Resources>    
    <Style TargetType="telerik:RadComboBox">
        <Setter Property="OpenDropDownOnFocus" Value="True"/>
    </Style>
</UserControl.Resources>

Still you need to keep the setting of the EditTriggers to "CellClick".
 

Greetings,
Maya
the Telerik team
0
Yaroslav
Top achievements
Rank 1
answered on 21 Feb 2011, 08:28 AM
<Style TargetType="telerik:RadComboBox">
    <Setter Property="OpenDropDownOnFocus" Value="True"/>
</Style>
It didn't help. I still need two clicks.

this is example of combobox columns that I use:
<telerik:GridViewComboBoxColumn Header="Branch" DataMemberBinding="{Binding BranchAddressId, Mode=TwoWay}"
         
ItemsSource="{Binding Addresses, Source={StaticResource customerRes}}" EditTriggers="CellClick"
          SelectedValueMemberPath="CustomerAddressId" DisplayMemberPath="BranchName" IsComboBoxEditable="True"/>
0
Maya
Telerik team
answered on 21 Feb 2011, 08:52 AM
Hi Yaroslav,

I am sending you the sample project I used for testing the case. Let me know in case of any misunderstandings.

 

All the best,
Maya
the Telerik team
0
Yaroslav
Top achievements
Rank 1
answered on 21 Feb 2011, 11:10 AM
Thanks for your sample project. I found where is the problem:

<telerik:RadGridView Name="clubsGrid"
                             EditTriggers="CellClick"
                             AutoGenerateColumns="False"                          
                             Margin="5"
                             telerik:Theming.Theme="Office_Blue">

telerik:Theming.Theme="Office_Blue"

If you apply this theme one click doesn't work (I didn't try other themes. May be the same). May be I use themes in wrong way?
One more situation when one click opening doesn't work (there is no theming):
click comboboxcolumn cell, popup list appears, then click another comboboxcolumn cell. nothing happens.

Improtant remark:

<telerik:RadGridView Name="clubsGrid"
                             EditTriggers="CellClick"
                             AutoGenerateColumns="False"                         
                             Margin="5"
                             telerik:Theming.Theme="Office_Blue">
<telerik:GridViewComboBoxColumn.EditorStyle>
                                <Style TargetType="telerik:RadComboBox">
                                    <Setter Property="OpenDropDownOnFocus" Value="true" />
                                </Style>
                            </telerik:GridViewComboBoxColumn.EditorStyle>
                        </telerik:GridViewComboBoxColumn>

works fine!
0
Maya
Telerik team
answered on 23 Feb 2011, 09:30 AM
Hi Yaroslav,

When setting a Theme, the implicit style for the RadComboBox is overridden. However, once you explicitly set the EditorStyle, this style on the other hand overrides the style defined by the Theme. That is why the approach you found out is working properly. 
As far as the issue with opening the drop-down is concerned, if you open a cell in the GridViewComboBoxColumn, without closing its drop-down, it will be expected that the next drop down will not be opened immediately as the first click is used for taking the previously edited (through the RadComboBox) cell to get out of edit-mode.

 

Regards,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Yaroslav
Top achievements
Rank 1
answered on 23 Feb 2011, 10:11 AM
Hi, Maya.
Thank you for your explanation.
Tags
GridView
Asked by
Yaroslav
Top achievements
Rank 1
Answers by
Maya
Telerik team
Yaroslav
Top achievements
Rank 1
Share this question
or