Completed
Last Updated: 27 Feb 2020 14:04 by paulo g
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 11 Sep 2013 10:22
Category: Editors
Type: Bug Report
1
FIX. RadGridView - GridViewDateTimeColumn editor does not allow max value 31/12/9999.
To reproduce:
-add a GridViewDateTimeColumn to a RadGridView.
-try to set RadDateTimeEditor.MaxValue in CellEditorInitialized event to 31/12/9999. As a result ArgumentOutOfRangeException("MaxDate cannot be higher than the max date") is thrown
3 comments
paulo g
Posted on: 27 Feb 2020 14:04

Thank you. 

Regards

Paulo

ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 27 Feb 2020 06:37
Hello, Paulo,
 
In order to specify the maximum value of RadDateTimeEditor, it is necessary to set the static RadDateTimePicker.MaximumDateTime property to the desired date. Thus, you are not expected to encounter errors when initializing the editor:
        public RadForm1()
        {
            InitializeComponent();
            RadDateTimePicker.MaximumDateTime = DateTime.MaxValue; 
            this.radGridView1.CellEditorInitialized += radGridView1_CellEditorInitialized;
        }

        private void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
        {
            RadDateTimeEditor dateTimeEditor = e.ActiveEditor as RadDateTimeEditor;
            if (dateTimeEditor != null)
            { 
                dateTimeEditor.MaxValue = new DateTime(9999,12,31);
            }
        }
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

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.
paulo g
Posted on: 26 Feb 2020 18:56

Hi

Is this issue fixed? If so, can you post an example?

We have version 2019.2.618.40 and it still happens.

Regards

Paulo