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
340
Turn off Today link on Calendar control
posted

I have a grid which contains a column with style = date.  I am trying to turn off the "Today" link at the bottom of the control.  How can I do this?

Thanks.

Parents
No Data
Reply
  • 69832
    Offline posted

    The DateTimeEditor which appears by default for a DateTime UltraGrid cell does not expose the underlying MonthCalendar control that is displayed when the dropdown appears (buse of a MonthCalendar limitation which was perceived as a bug in the DateTimeEditor, it became necessary to create a new instance of the control each time the dropdown appears).

    I believe the UltraGrid exposes an event which fires after the dropdown appears; you might be able to use that event to get a reference to that MonthCalendar control via the UltraGrid's Controls collection, and then set its 'ShowToday' property to false. Note that I have never tried this, so I don't know if this will cause any painting issues.

    An alternative would be to assign an UltraCalendarCombo instance to the column's EditorControl property, and remove the 'Today' button from its DateButtons collection.

Children
No Data