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
560
Edit only the Time part of a DateTime
posted

Requirements: the xamdatagrid has a field that would display the Time in the format "hh:mm".

 

That sounds simple enough?  I added a xamDateTimeEditor and set the mask property to {}{time}.  It doesn't work since it's showing the year in the editor.  If the value is 2007-03-03 08:35:00 , the editor is showing 20:07 .  How do I set the DisplayFormat?

 

Here's my field:

<igDP:UnboundField Label="Time" BindingPath="TreatmentTime" Row="1" Column="5" BindingMode="TwoWay">

              <igDP:UnboundField.Settings>

                <igDP:FieldSettings  Width="50"  EditorType="{x:Type igEditors:XamDateTimeEditor}" LabelClickAction="Nothing">

                  <igDP:FieldSettings.EditorStyle>

                    <Style TargetType="{x:Type igEditors:XamDateTimeEditor}">

                        <Setter Property="Mask" Value="{}{time}" />

                      </Style>

                  </igDP:FieldSettings.EditorStyle>

                </igDP:FieldSettings>

              </igDP:UnboundField.Settings>

            </igDP:UnboundField>