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.
Unfortunately, activation email could not send to your email. Please try again.

Grid Control

Thread ID:





79167 Jan 22,2009 01:58 PM Jan 23,2009 08:04 AM Windows Forms 1
Tags: GridControl
Scott Griswold
Asked On January 22, 2009 01:58 PM

1. Is it possible to create a calendar control with a masked eidt box in the same cell?
2. Is it possible to have a autocomplete control in a cell?



Nisha Arockiya A [Syncfusion]
Replied On January 23, 2009 08:04 AM

Hi Scott,

Thanks for your interest in syncfusion Products.

Currently there is no cell style that mixes a maskedit with a dropdown calendar.

One possible solution is to handle the CurrentCellValidateString method and verify the text is valid with each keystroke. Below is some code snippets. Here is a sample showing this method.

private void Form1_Load(object sender, System.EventArgs e)


this.gridControl1[4, 2].BackColor = Color.LightPink;

this.gridControl1[4, 2].CellType = "MonthCalendar";

this.gridControl1[4, 2].CellValue = DateTime.Now;

this.gridControl1[4, 2].CellValueType = typeof(DateTime);

this.gridControl1[4, 2].Format = "M/d/yyyy";


private void gridControl1_CurrentCellValidateString(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellValidateStringEventArgs e)


GridCurrentCell cc = this.gridControl1.CurrentCell;

if(cc.RowIndex == 1 && cc.ColIndex == 1)




DateTime dt = DateTime.Parse(e.Text);




e.Cancel = true;




The second option is to use our DateTimePicker in a cell and format it. Here is a sample showing this implementation.

Please let me know if this serve your needs.



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.

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.