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
470
11.2 Datagrid shows only date
posted

Hello,

I tried to bind a DataTime Field of Datatable to a field. Autogenerate is false. field is defined as:

<igDP:Field Name="Created" Label="{DynamicResource ucCylinderMove_Field_Created.Label}">
                            <igDP:Field.Converter>
                                <Converters:FullDateTimeConverter />
                            </igDP:Field.Converter><igDP:Field.Settings>
                                <igDP:FieldSettings AutoSizeScope="ViewableRecords" AutoSizeOptions="DataCells" AllowEdit="False" />
                            </igDP:Field.Settings>
As You can see I also have tried to use a converter to display the missing time, but it is still missing time portion.
I also tried to use a datetimeeditor but the same result.
If I look into the datafield it is holding date and time.
What could be wrong with it?
  • 30945
    Offline posted

    Hello,

     

    I am very glad that you have managed to solve the issue that you were having. Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

  • 470
    Verified Answer
    Offline posted

    I found the solution !

    For all are interested or having an equivalent problem this helps:

     

    <igDP:Field Name="Created" Label="{DynamicResource ucCylinderMove_Field_Created.Label}">
      <igDP:Field.Settings>
        <igDP:FieldSettings AutoSizeScope="ViewableRecords" AutoSizeOptions="DataCells" AllowEdit="False" EditAsType="{x:Type sys:DateTime}">
          <igDP:FieldSettings.EditorStyle>
    	 <Style TargetType="{x:Type igEditors:XamDateTimeEditor}" >
    	  <Setter Property="Mask" Value="{}{date} {longtime}" />
    	 </Style>
          </igDP:FieldSettings.EditorStyle>
        </igDP:FieldSettings>
      </igDP:Field.Settings>
    </igDP:Field>