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

GridViewDateTimeColumn dropdown still unable to show both Date and Time panels?

1 Answer 30 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 10 Mar 2015, 01:05 PM
I see some posts in years back mentioned an intent to add the ability to choose both date and time in the GridViewDateTimeColumn's dropdown. Has that ever been done? Although we can choose the EditorType to be a DateTimePicker, there seems to be no way to tell that Editor we want to see both, not just date. If the feature is available, please describe how to access it. Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 11 Mar 2015, 06:42 AM
Hello David,

Thank you for writing.

You can access the date time editor in the CellEditorInitialized event and there you can enable its time picker:
void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    RadDateTimeEditor editor = e.ActiveEditor as RadDateTimeEditor;
    if (editor != null)
    {
        RadDateTimeEditorElement element = (RadDateTimeEditorElement)editor.EditorElement;
        element.ShowTimePicker = true;
           element.CalendarSize = new Size(400,250);
    }
}

More about the editors in RadGridView is available here: http://www.telerik.com/help/winforms/gridview-editors.html.

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
David
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or