Home Forums WPF controls Xceed DataGrid for WPF datetime to string and vice versa

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25552 |

    hi there,
    i have a datatable containing a column with datetime format.
    i would like to display and edit the datetime format as a string in the datagrid.

    now i have a datatemplate to display the datetime-string bound to a converter. that works.

    and i have a celleditor bound to the converter to edit the string – does not work! i cannot edit the cell.

    <src:StringDateConverter x:Key=”DateConverter”/>
    <DataTemplate x:Key=”Date_CellTemplate”>
    <TextBlock Text=”{Binding Converter={StaticResource DateConverter}}”/>
    </DataTemplate>
    <xcdg:CellEditor x:Key=”Date_CellEditor”>
    <xcdg:CellEditor.EditTemplate>
    <DataTemplate>
    <TextBlock Text=”{Binding Converter={StaticResource DateConverter}}”/>
    </DataTemplate>
    </xcdg:CellEditor.EditTemplate>
    <xcdg:CellEditor.ActivationGestures>
    <xcdg:KeyActivationGesture Key=”Right”/>
    <xcdg:KeyActivationGesture Key=”Left”/>
    </xcdg:CellEditor.ActivationGestures>
    </xcdg:CellEditor>

    <xcdg:Column FieldName=”ENDCOLLECTION” Title=”Collection” CellContentTemplate=”{StaticResource Date_CellTemplate}” CellEditor=”{StaticResource Date_CellEditor}”/>

    the class stringdateconverter does the convertion, convertback is never called.
    please, whats wrong?
    thanks k.

    Imported from legacy forums. Posted by noname (had 1957 views)

    User (Old forums)
    Member
    Post count: 23064

    ok, i am so confused.
    using a textblock for data editing!
    sorry, with a textbox it works.

    Imported from legacy forums. Posted by noname (had 2801 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.