wpf - DataGrid decimal format converter -


i have never used wpf datagrid before , trying format decimal columns use specific value format based on other columns values of row.

using infragistics xamdatagrid in past, able set styles xamcurrencyeditor, setting values "format" , "mask" , use multi value converter wrote, passing along dataitem.

the grid columns created programatically. so, create field so:

var field = new datagridtextcolumn { header = item.name, binding = new binding("[" + item.name + "].value") { mode = bindingmode.twoway } }; 

this field contain decimal values (even though column text column).

how can add formatting column takes account other values in data object? not sure how reference actual bound data row pass along data along cells value converter.

not sure how work if decimal string xaml syntax decimal property

binding stringformat=decvalue: {0:n2}}


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -