SelectionBoxTemplate not working

6 posts, 0 answers
  1. David
    David avatar
    46 posts
    Member since:
    Nov 2008

    Posted 07 Nov 2010 Link to this post

    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?
  2. George
    Admin
    George avatar
    1332 posts

    Posted 10 Nov 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. David
    David avatar
    46 posts
    Member since:
    Nov 2008

    Posted 10 Nov 2010 Link to this post

    I hard coded the text  just to see if it worked.  What I really what to do is specify my own ContextMenu and InputBindings. 
  5. George
    Admin
    George avatar
    1332 posts

    Posted 12 Nov 2010 Link to this post

    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
  6. xp
    xp avatar
    13 posts
    Member since:
    Apr 2009

    Posted 24 Oct 2011 Link to this post

    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?
  7. George
    Admin
    George avatar
    1332 posts

    Posted 25 Oct 2011 Link to this post

    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 >>

Back to Top
UI for WPF is Visual Studio 2017 Ready