Set min/max size of dropdown

4 posts, 0 answers
  1. Artem
    Artem avatar
    2 posts
    Member since:
    Mar 2020

    Posted 17 Aug Link to this post

    How can i set min/max size of dropdown?
  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3957 posts

    Posted 17 Aug Link to this post

    Hi, Artem, 

    RadDateTimePicker offers the CalendarSize property which allows you to specify the size of the calendar in the drop down.

    As to the minimum/maximum size of the drop down, you can use the following code snippet: 

                RadDateTimePickerCalendar calBehavior = this.radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar;
                calBehavior.DropDownMinSize = new Size(300, 300);
                calBehavior.DropDownMaxSize = new Size(600,600);

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

  3. Artem
    Artem avatar
    2 posts
    Member since:
    Mar 2020

    Posted 17 Aug Link to this post

    Thank you for the answer!

    I've already tried this solution, but it didn't work. I lost opportunity to resize calendar at all.
  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3957 posts

    Posted 17 Aug Link to this post

    Hello, Artem,

    Indeed, the user is allowed to shrink the width, but not the height. 

    I have logged it in our feedback portal by creating a public thread on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

    I have also updated your Telerik points.

    Currently, the possible solution that I can suggest is to use the following code snippet:

            public RadForm1()
            {
                InitializeComponent();
                //this.radDateTimePicker1.CalendarSize = new Size(500, 500);
    
    
                
                RadDateTimePickerCalendar calBehavior = this.radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar;
                calBehavior.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
                calBehavior.DropDownMinSize = new Size(400, 400);
                calBehavior.DropDownMaxSize = new Size(600, 600);
    
               this.radDateTimePicker1.Opened+=radDateTimePicker1_Opened;
            }
    
            private void radDateTimePicker1_Opened(object sender, EventArgs e)
            {
                RadDateTimePickerCalendar calBehavior = this.radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar;
                calBehavior.PopupControl.MinimumSize= calBehavior.DropDownMinSize;
            }

    Should you have further questions please let me know.

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

Back to Top