PropertyGrid editor: DateTime numericUpDown

  • Thread starter Thread starter Monica Graber
  • Start date Start date
M

Monica Graber

Do you know how can I change the default editor of DateTime in a
propertyGrid in order to control date/time value ( like the ShowUpDown
using DateTimePicker control), i.e. without Calendar, that only controls
date information.

Is it possible ? Do you have some idea ?

Where can I find information about that ?

I really appreciate your answer...

Monica
 
I think you must implement you own UITypeEditor.
To do this you must create a class that inherits from
UItypeEditor.
Then you must apply the attribute Editor before the
property that access your DateTime object. In the
following example DateTimeEditor is the class that
implement your custom editor.
EditorAttribute(typeof(DateTimeEditor),typeof
(System.Drawing.Design.UITypeEditor));

Hope this help you,if I understand your problem.
 
Back
Top