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

Grid Cell date setting min date

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

2 Replies

AD Administrator Syncfusion Team 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.


AD Administrator Syncfusion Team July 30, 2003 03:40 AM

Forgot to attached the sample.

Loader.
Live Chat Icon For mobile
Up arrow icon