Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
How to NOT allow the user to choose a past date in a date column?
posted

I have a grid that has a date column.  I don't want the user to be able to select past dates when he clicks on the column to choose a date.  Any ideas on how to do this??

  • 469350
    Suggested Answer
    Offline posted

    What do you mean by "past date"?

    If you mean dates eariler than today, then you can simply set the MinValue property on the column to today's date.

    If you mean earlier than the date that is already selected, then you will probably need to code that yourself. You could trap BeforeCellUpdate and compare the date in the grid with the date in the data source.