customized StringFormat in WPF DataGrid

Posted by Boris Lipschitz on Stack Overflow See other posts from Stack Overflow or by Boris Lipschitz
Published on 2010-05-19T01:24:26Z Indexed on 2010/05/19 1:30 UTC
Read the original article Hit count: 709

Filed under:
|
|

What would be the most efficient way to set customized formatting of the column in DataGrid. I can't use the following StringFormat, as my sophisticated formatting also depends on some other property of this ViewModel. (e.g Price formatting has some complicated formatting logic based on different markets.)

Binding ="{Binding Price, StringFormat='{}{0:#,##0.0##}'}"

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf