DateTime Picker in GridView Too Small

1 Answer 96 Views
GridView
Walker
Top achievements
Rank 1
Walker asked on 23 Apr 2023, 01:40 AM
I have a datatime picker within my gridview. When I try to pick a date the calendar appears "squished"/consolidated. I can drag the corner and fix the issue but I'd rather not require the user to do this. How can I set a default height/width? See attached screenshot.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 Apr 2023, 05:06 AM

Hi, Walker,

I have prepared a sample code snippet for your reference demonstrating how to make the editor's popup bigger once the cell enters edit mode:

 

            this.radGridView1.CellEditorInitialized += RadGridView1_CellEditorInitialized;

        private void RadGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
        {
            RadDateTimeEditor dateEditor = e.ActiveEditor as RadDateTimeEditor;
            if (dateEditor!=null)
            {
                RadDateTimeEditorElement element = dateEditor.EditorElement as RadDateTimeEditorElement;
                element.CalendarSize = new Size(300, 300);
            }
        }

The achieved result is illustrated in the below image:

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

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridView
Asked by
Walker
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or