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 Cell date setting min date

Thread ID:

Created:

Updated:

Platform:

Replies:

6059 Jul 30,2003 02:03 AM Jul 30,2003 03:40 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On July 30, 2003 02:03 AM

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 03:38 AM

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 03:40 AM

Forgot to attached the sample.

CONFIRMATION

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.

;