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

Force radcombobox to open UP

4 Answers 205 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 09 Oct 2012, 10:47 PM
Is there a way to force the combobox to open "UP" instead of the default of dropping the list of items "down"?
Thanks
Mark

4 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 15 Oct 2012, 09:51 AM
Hello Mark,

In the current version of RadComboBox this feature is not supported.

If you have any other questions do not hesitate to contact us again.

Kind regards,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Darshan
Top achievements
Rank 1
answered on 03 Jul 2019, 08:59 PM

I see there is no easy solution to this in Telerik WPF.

This can be done as below.

private void CmbRhythmStanding_OnLoaded(object sender, RoutedEventArgs e)
        {
            ControlTemplate ct = CmbRhythmStanding.Template;
            System.Windows.Controls.Primitives.Popup pop = ct.FindName("PART_Popup", CmbRhythmStanding) as System.Windows.Controls.Primitives.Popup;
            pop.Placement = System.Windows.Controls.Primitives.PlacementMode.Top;
        }

0
Dinko | Tech Support Engineer
Telerik team
answered on 08 Jul 2019, 12:06 PM
Hi Darshan,

You are right that if you want to change the Placement property of the Popup, you will need to set it directly to the element. What you can use instead of the FindName method is to use our ChildrenOfType<T>() extension method. Still, both approaches need to search in the visual tree to get the Popup element.

private void Combo_Loaded(object sender, RoutedEventArgs e)
{
    var popup = (sender as RadComboBox).ChildrenOfType<Popup>().FirstOrDefault();
    popup.Placement = System.Windows.Controls.Primitives.PlacementMode.Top;
}


Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Darshan
Top achievements
Rank 1
answered on 08 Jul 2019, 03:14 PM

Thank you Dinko, I tried it with ChildrenOfType<T>() extension and it works.

Tags
ComboBox
Asked by
Mark
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Darshan
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or