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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MonthCalender cell in Grid

Thread ID:





71063 Jan 14,2008 11:34 AM UTC Jan 14,2008 05:20 PM UTC WinForms 1
Tags: Tools
Asked On January 14, 2008 11:34 AM UTC


I have attached my code here. I have MonthCalender cell in my grid now i have to restrict the user from entering the text in this cell.
I have tried with different dropdownstyles but it's not working.Can you please suggest me the better solution.



Jeba S [Syncfusion]
Replied On January 14, 2008 05:20 PM UTC

Hi Sunitha,

If you want to avoid your user entering the text in MonthCalender cell, then you can try using CurrentCellValidateString. This event is hit keystroke by keystroke and you can test e.Inner.Text to see if it is something you want to accept.

Below is the code snippet:

private void gridGroupingControl1_TableControlCurrentCellValidateString(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellValidateStringEventArgs e)
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
if(cc.RowIndex >=4 && cc.ColIndex == 3)
DateTime dt = DateTime.Parse(e.Inner.Text);
e.Inner.Cancel = true;

Please refer to the below KB article for more details on Validation of a cell.

Kindly let us know if you need any further assistance.



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