I think you're going the hard way. I think it's a lot simpler to add in the class type your ObservableCollection is another field with a field containing the less decimals string and show that in your grid. Something like:
privatec ObservableCollection<dataclass> _list;
public ObservableCollection<dataclass> list
{
get
{
return this._list;
}
set
{
this._list = value;
RaisePropertyChanged("list");
}
}
public class DataClass
{
public double val { get;set; }
public string formattedVal
{
get
{
return this.val.ToString("#0.00");
}
}
}
Another way could be using DataGridTemplateColumn.