Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
690
Howto change dropdownwidth in UltraDateTimeEditor showing weeknumbers
posted

Hello,

I'm using datetimeeditor and changed that to show week numbers with the following code:

        private void udteConfirmedDeliveryDate_AfterDropDown(object sender, EventArgs e) {
            DateTimeEditor editor = (DateTimeEditor)this.udteConfirmedDeliveryDate.Editor;

            PropertyInfo propInfo = editor.GetType().GetProperty("MonthDropDown", BindingFlags.NonPublic | BindingFlags.Instance);
            MonthCalendar calendar = (MonthCalendar)propInfo.GetValue(editor, null);

            calendar.ShowTodayCircle = true;
            calendar.ShowWeekNumbers = true;
        }

But now, the calendar is cut at the right side, and the arrow to "scroll" to the next month is no more visible (datetimeeditor.png)

I tried to set the width in the code above with

calendar.Width = calendar.Width + 100;

but that was ignored.

The ultradatetimeeditor is embedded in a tablelayoutpanel with dock=top. Two columns to the right, there is another datetimeeditor wiithout weeknumbers, displayed as expexted.

How can I change the dropdown calendar width?

      

  • 690
    Verified Answer
    Offline posted

    solution from here:

    http://ko.infragistics.com/community/forums/t/31981.aspx

    calendar.Parent.Bounds = new Rectangle(calendar.Parent.Bounds.X - 9, calendar.Parent.Bounds.Y, 250, 170);