RadDropDownButton and RadComboBox

10 posts, 1 answers
  1. Randall Nelson
    Randall Nelson avatar
    25 posts
    Member since:
    Oct 2007

    Posted 10 Dec 2009 Link to this post

    I have a RadDropDownButton and in the content of the drop down I have a RadComboBox. The problem is when the user selects an option from the combo box, the RadDropDownButton closes up.  Is there a way to prevent this?  Sample code below:

    <UserControl x:Class="DropDownButtonIssue.MainPage" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"   
        xmlns:tk="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"    
        xmlns:telInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" 
        mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">  
      <Canvas x:Name="LayoutRoot" Height="200" Width="300" Background="AliceBlue">  
            <tk:RadDropDownButton x:Name="btnTest" Width="75" Height="22"   
                                  DropDownIndicatorVisibility="Collapsed"   
                                   DropDownHeight="100" DropDownWidth="175"  Content="Click Me" 
                                   > 
                <tk:RadDropDownButton.DropDownContent> 
                    <Canvas x:Name="cvContent">  
                        <telInput:RadComboBox x:Name="cbDays" Width="100" SelectedIndex="0" > 
                            <telInput:RadComboBoxItem Content="Last 7 Days"/>  
                            <telInput:RadComboBoxItem Content="Last 30 Days"/>  
                            <telInput:RadComboBoxItem Content="All"/>  
                        </telInput:RadComboBox> 
                    </Canvas> 
                </tk:RadDropDownButton.DropDownContent> 
            </tk:RadDropDownButton> 
        </Canvas> 
    </UserControl> 
     
  2. Answer
    Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 11 Dec 2009 Link to this post

    Hi Randall,
     

    Thank you for contacting us.

    In order to disable the auto-close on selection-changed behavior please set the button's KeepOpen property to True:

    <tk:RadDropDownButton
        x:Name="btnTest"
        KeepOpen="True"
        ...
     
     
    Please give it a try and let us know if you have other questions.

    Best wishes,
    Ivan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Randall Nelson
    Randall Nelson avatar
    25 posts
    Member since:
    Oct 2007

    Posted 11 Dec 2009 Link to this post

    Had to get the latest build, but this works perfectly.  Thanks.
  5. Lee
    Lee avatar
    14 posts
    Member since:
    Nov 2009

    Posted 29 Jul 2010 Link to this post

    I am on Silverlight version 2010.1.603.1040.....and the RadDropDownButton appears to no longer have this 'KeepOpen' property.

    I am having the same issue as in this ticket. How can I achieve the 'KeepOpen' functionality with the RadDropDownButton?


    Thanks,

    Lee
  6. Viktor Tsvetkov
    Admin
    Viktor Tsvetkov avatar
    382 posts

    Posted 30 Jul 2010 Link to this post

    Hi Lee,

    Currently there is no such property. I added this issue in our public issue tracking system under the name "RadDropDownButton: Add KeepOpen property" and it will be available for tracking and voting tomorrow the latest.

    On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverlight applications. For more information, please visit http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx

    Best wishes,
    Viktor Tsvetkov
    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
  7. Lee
    Lee avatar
    14 posts
    Member since:
    Nov 2009

    Posted 30 Jul 2010 Link to this post

    Hey Viktor,

    Talking to you in two threads for this, one support and one here. My apologies for that. Below is what I mentioned in my other reply, just to make sure you get it. Again, I really appreciate the help and timely feedback.


    My RadDropDownButton is hosted in a RadRibbonDropDownButton which is hosted in the RadRibbonBar.

    When it is only the RadDropDownButton containing the RadColorPicker, the RadDropDownButton correctly stays open after a color has been chosen.

    When it is a RadRibbonDropDownButton containing a RadDropDownButton as its drop down content, and the RadDropDownButton contains the RadColorPicker, the issue appears. The RadDropDownButton closes immediately after a color is selected, but combo boxes selections work fine and the RadDropDownButton stays open.

    I was able to recreate the behavior that I just described in a very basic test application. Creating a new application and putting the xaml that I pasted below in the MainPage.xaml will recreate the issue for you.

    Thanks again for your help!

    --------------------------------------------------------------------------------------------------------------------------------

    <UserControl x:Class="TestRadDropDownButton.MainPage"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"

    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"

    xmlns:telerikRibbonBar="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonBar"

    mc:Ignorable="d"

    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">

    <Border Margin="5,5,5,5" BorderBrush="Black" BorderThickness="1,1,1,1" CornerRadius="5,5,5,5" Padding="5,5,5,5">

    <Grid x:Name="contentGrid">

    <telerikRibbonBar:RadRibbonBar x:Name="MainToolbar"

    Title="Test Color Picker">

    <telerikRibbonBar:RadRibbonTab x:Name="ColorPickerTab"

    Header="Color Picker" >

    <telerikRibbonBar:RadRibbonGroup Header="Color Picking"

    Visibility="Visible" >

    <telerikRibbonBar:RadButtonGroup>

    <telerikRibbonBar:RadRibbonDropDownButton x:Name="chartAppearanceDropDownButton"

    Size="Large"

    LargeImage="/Resources/close.png"

    Text="Appearance" >

    <telerikRibbonBar:RadRibbonDropDownButton.DropDownContent >

    <telerik:RadDropDownButton x:Name="appearanceDropDownButton"

    Height="30"

    Width="80"

    Margin="3,0,0,0"

    HorizontalAlignment="Center"

    VerticalAlignment="Center" >

    <telerik:RadDropDownButton.DropDownContent>

    <Grid x:Name="colorPickerLayoutRoot">

    <Border Margin="5,5,5,5" BorderBrush="Black" BorderThickness="1,1,1,1" CornerRadius="5,5,5,5" Padding="5,5,5,5" Background="LightBlue">

    <Grid x:Name="colorPickerContentGrid">

    <Grid.RowDefinitions>

    <RowDefinition Height="20" />

    <RowDefinition Height="20" />

    <RowDefinition Height="35" />

    <RowDefinition Height="20" />

    <RowDefinition Height="20" />

    <RowDefinition Height="35" />

    </Grid.RowDefinitions>

    <TextBlock Grid.Row="1" Text="Select Color: " HorizontalAlignment="Center"/>

    <telerikInput:RadColorPicker x:Name="foregroundColorPicker"

    Grid.Row="2"

    HorizontalAlignment="Center"

    VerticalAlignment="Center"

    Margin="2" />

    <TextBlock Grid.Row="4"

    Text="Test Combo:"

    HorizontalAlignment="Center"

    VerticalAlignment="Bottom"/>

    <ComboBox x:Name="testComboBox"

    Grid.Row="5"

    Margin="5"

    HorizontalAlignment="Stretch"

    VerticalAlignment="Stretch">

    <ComboBox.Items>

    <ComboBoxItem Content="Value1" />

    <ComboBoxItem Content="Value2" />

    <ComboBoxItem Content="Value3" />

    <ComboBoxItem Content="Value4" />

    <ComboBoxItem Content="Value5" />

    </ComboBox.Items>

    </ComboBox>

    </Grid>

    </Border>

    </Grid>

    </telerik:RadDropDownButton.DropDownContent>

    </telerik:RadDropDownButton>

    </telerikRibbonBar:RadRibbonDropDownButton.DropDownContent>

    </telerikRibbonBar:RadRibbonDropDownButton>

    </telerikRibbonBar:RadButtonGroup>

    </telerikRibbonBar:RadRibbonGroup>

    </telerikRibbonBar:RadRibbonTab>

    </telerikRibbonBar:RadRibbonBar>

    </Grid>

    </Border>

    </Grid>

    </UserControl>

  8. Lee
    Lee avatar
    14 posts
    Member since:
    Nov 2009

    Posted 03 Aug 2010 Link to this post

    Any progress on this yet Viktor? Were you able to recreate the issue using the xaml I posted?

    Thanks!
  9. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 03 Aug 2010 Link to this post

    Hello Lee,

    I posted a reply to your support thread. Give it a try and let me know if the workaround helps.

    Best wishes,
    Kiril Stanoev
    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
  10. Shweta
    Shweta avatar
    11 posts
    Member since:
    Oct 2011

    Posted 02 Dec 2011 Link to this post

    Hi Ivan,
    My issue is reverse of above post. Like when I select item from RadDropDownButton, it doesn't close automatically on selection. Even if I seelct item, dropdown remains open (expanded), until I clcik somewhere else on screen.
     Please suggest me, how can I collapse this dropdown, once item is selected.
  11. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 06 Dec 2011 Link to this post

    Hi Shweta,

     We replied to your question in this forum post.

    Regards,
    Petar Mladenov
    the Telerik team

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

Back to Top
DevCraft banner