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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Cell date setting min date

Thread ID:





6059 Jul 30,2003 06:03 AM UTC Jul 30,2003 07:40 AM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On July 30, 2003 06:03 AM UTC

Hi I want to set the min date for the grid cell date selection, i m setting the datatype for cell as date, so automatically i m gettting calendar drop down for dateselection upon click the button in the cell, there i want to restrict the user to select a particular date only How can i achieve this? Regards Rajaraman

Administrator [Syncfusion]
Replied On July 30, 2003 07:38 AM UTC

I don't think there is a property setting that will allow you to do this. You can validate numbers through setting properties but not a DateTime. You can use CurrentCellValidating to validate your user input. But this happens when teh user leaves the cell. If you actually want to prevent teh user from selecting a date inside teh dropped calendar, then this requires more work. You can get at the embedded MonthCalendar control to set its MaxData and MinDate properties, but it takes some effort. You would do it in CurrentCellShowingDropDown since these values may vary from cell to cell. But the problem is the behavior of the dropdown. If you click a date (whether of not the calendar accepts teh change, the dropdown closes. If you put up a warning message at this point, and reopen teh dropdown afterwards, it si not too bad. But without the warning message you see some flashing. Attached is a sample that shows some attempts at doing the validation within the calendar and not in teh cell. I suspect to do it properly, you would have to derive your own cell control.

Administrator [Syncfusion]
Replied On July 30, 2003 07:40 AM UTC

Forgot to attached the sample.


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