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

SelectionBoxTemplate not working

5 Answers 338 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 08 Nov 2010, 01:12 AM
I specified the SelectionBoxTemplate on my ComboBox, but its being ignored. My code is:
<ti:RadComboBox Name="CodeComboBox" Margin="5,0,0,0" MinWidth="80"
            tc:StyleManager.Theme="Office_Blue"
            IsEditable="True"
            ItemsSource="{Binding DataView}"
            DisplayMemberPath="{Binding DisplayColumnName}"
            SelectedValuePath="{Binding KeyColumnName}"
            SelectedItem="{Binding SelectedView}">
         <ti:RadComboBox.SelectionBoxTemplate>
              <DataTemplate>
                  <TextBox Text="Hows it going" Background="Green"/>
              </DataTemplate>
          </ti:RadComboBox.SelectionBoxTemplate>
</ti:RadComboBox>

Am I doing something wrong?

5 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 10 Nov 2010, 01:18 PM
Hi David,

Could you please let us know why do you hardcode the Text of the TextBox in the SelectionBoxTemplate, when you bound the RadComboBox? If you give us more details about your scenario it would be very helpful.
For additional information about SelectonBoxTemplate, please refer to our online documentation - http://www.telerik.com/help/wpf/radcombobox-populating-with-data-selectionbox.html

Regards,
George
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
David
Top achievements
Rank 1
answered on 10 Nov 2010, 04:20 PM
I hard coded the text  just to see if it worked.  What I really what to do is specify my own ContextMenu and InputBindings. 
0
George
Telerik team
answered on 12 Nov 2010, 03:41 PM
Hi David,

SelectionBoxTemplate is applied only when the RadComboBox is not editable. Otherwise, the EditableTemplate gets applied. Please, pay attention to that you need to set a ControlTemplate for EditableTemplate, not a DataTemplate.

I hope this helps.

Sincerely yours,
George
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
xp
Top achievements
Rank 1
answered on 24 Oct 2011, 09:05 PM
I have a RadCombobox with SelectionBoxTemplate binding, The itemsource is binded to list of object and  the RadComboBox is inside a RadPane

If the RadPane is docked, the selectionbox display is fine. After RadPane is undocked and floated, it does not woks anymore and it will display the whole object, see attached picture.

Any fixed?
0
George
Telerik team
answered on 25 Oct 2011, 08:16 AM
Hi,

 
Please, make sure the SelectionBoxTemplate is not defined in the window resources, but in the App.xaml file. When a pane is floating, it is placed in another window which could break template applying.


Greetings,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ComboBox
Asked by
David
Top achievements
Rank 1
Answers by
George
Telerik team
David
Top achievements
Rank 1
xp
Top achievements
Rank 1
Share this question
or