We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to manage time display and validation in GridGroupingControl

Thread ID:





141810 Jan 5,2019 04:14 AM UTC Jan 7,2019 12:55 PM UTC WinForms 1
Tags: GridGroupingControl
Mariusz Juszkiewicz
Asked On January 5, 2019 04:14 AM UTC

One of the fields in my application requires time input (DateTime). I have tried different cell types: MaskEdit, MonthCalendar, and simple textbox but cannot succeed with solution that I want. With MonthCalendar I use

gGCProposals.TableDescriptor.Columns["ProposalDueTime"].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.MonthCalendar;
gGCProposals.TableDescriptor.Columns["ProposalDueTime"].Appearance.AnyRecordFieldCell.Format = "HH:mm";

however, there is no way to stop the dropdown calendar.

With MaskEdit:

gGCProposals.TableDescriptor.Columns["ProposalDueTime"].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.MaskEdit;
gGCProposals.TableDescriptor.Columns["ProposalDueTime"].Appearance.AnyRecordFieldCell.MaskEdit = GridMaskEditInfo.Default;
gGCProposals.TableDescriptor.Columns["ProposalDueTime"].Appearance.AnyRecordFieldCell.MaskEdit.Mask = "hh:mm ??";

however, I cannot save into DateTime type.

Does anyone know how to implement for example sfDateTimeEdit with it's DateTime pattern of short time or somthing similar?

Arulraj A [Syncfusion]
Replied On January 7, 2019 12:55 PM UTC

Hi Mariusz, 

Thanks for using Syncfusion product. 

there is no way to stop the dropdown calendar 
To hide the drop down for month calendar, you could use the ShowButtons property. Please refer the following code example. 

this.gridGroupingControl1.TableDescriptor.Columns["Date"].Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.Hide; 
I cannot save into DateTime type 
In mask edit cell type is string format. So, you are unbale to get the exact date. So, we could suggest to use above one. 

Arulraj A 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon