c# - WPF DataGridTextColumn binding doesn't accept decimals -


i don't understand problem be. binding on decimal property. here xaml:

<datagridtextcolumn header="price" binding="{binding price, mode=twoway, updatesourcetrigger=propertychanged} width="*"/> 

i literally cannot type '.' character. why stop me typing character , how tell let me so.

i tried doing string format this:

<datagridtextcolumn header="price" binding="{binding price, mode=twoway, updatesourcetrigger=propertychanged, stringformat={}{0:n2}} width="*"/> 

but doesn't solve problem because append ".00" end of whatever type.

all need permission type period.

update:

i directed here. removed updatesourcetrigger property , made possible me type '.'. not have 4.5 beta installed , localization settings correct. question how datagridtextcolumn allow me type '.' updatesourcetrigger property set?

updatesourcetrigger=propertychanged reevalutes text on every keystroke. number ends in decimal point invalid. change updatesourcetrigger lostfocus (same removing it) or try type '.' while have other digits after it.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -