WPF DataGridTextColumn binding doesn't accept decimals

后端 未结 1 1998
难免孤独
难免孤独 2020-12-20 15:15

I don\'t understand what the problem could be. The binding is on a Decimal property. Here is the XAML:



        
相关标签:
1条回答
  • 2020-12-20 16:01

    UpdateSourceTrigger=PropertyChanged reevalutes the text on every keystroke. A number that ends in a decimal point is invalid. Change the UpdateSourceTrigger to LostFocus (same as removing it) or try to type the '.' while you have other digits after it.

    0 讨论(0)
提交回复
热议问题