Q: WPF Datagrid text column format for numbers and comma only I have a data grid column which is value is editable. 
  <DataGridTextColumn Header="Value" Binding="{Binding Value}" />

Currently I can enter any value for cell. (Characters, numbers,..)
I need to validate this only for numbers and comma.
Is there any way to achieve this?

A: You should change the type of the Value property to double, float or decimal. You can't set a property of type double to anything else than a valid double value.
Only if Value is a string you can set it to "any value".
So the easiest way to achieve what you want is to use the appropriate data type. If you want to perform some more sophisticated validation, please read this.

A: The only thing that comes to my mind is adding a StringFormat to your Binding
Binding="{Binding Value, StringFormat=\{0:F\}}


A: <DataGridTextColumn Binding="{Binding Value, StringFormat={}{0:N2}}"/>

You can fix this problem by using StringFormat.
