AD
Administrator
Syncfusion Team
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.
AD
Administrator
Syncfusion Team
July 30, 2003 07:40 AM UTC
Forgot to attached the sample.