Format DataGrid Column as User is Typing RRS feed

  • Question

  • I have a DataGrid where on of the columns is a simple DataGridTextColumn. What I would like to do is as the user is typing into the row in the DataGrid, only allow them to enter a specific format, in this case dd/MM/yyyy. I shall enter the / /  for them, then they have to type in a date that fits this format.

    This is my DataGridColumn;
        <DataGridTextColumn Header="Date" Width="*"/>
    Is there a way to format the Column as the user is typing?
    Wednesday, April 13, 2016 2:33 PM


  • Hi,

    Is this a workflow issue?

    AFAIK, we can format datagridtextcolumn in wpf, like:

     <wpfToolkit:DataGridTextColumn Header="Your Header" Binding="{Binding TheDate,StringFormat={}\{0:dd/MM/yyyy hh:mm\}}" />

    Have a good day.



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Angie Xu Wednesday, May 4, 2016 9:27 AM
    • Marked as answer by Angie Xu Wednesday, May 4, 2016 9:27 AM
    Friday, April 15, 2016 7:11 AM