I'm not really sure when the DataColumn expression is evaluated, so there may be other ways to accomplish this, but here's one way.
First, be sure to use an EntityList as the data source for the grid and binding manager.
Next, you need to fire a PropertyChanged event for the expression property. (Since the DynamicEntity derives from Entity, PropertyChanged will automatically be fired for "simple" properties already.) If you've used something similar to the sample DelegateHolder class in the tutorials, you can take a somewhat inelegant approach and add logic to the Setter method to do this:
public void Setter(object pParent, object pValue) {
DataRow aRow = (DataRow)pParent;
aRow[mColumnName] = pValue;
// If Qty or Cost changes, then fire event for calculated Total
if (mColumnName == "Qty" || mColumnName == "Cost") {
DynamicEntity ent = pParent as DynamicEntity;
ent.ForcePropertyChanged(new PropertyChangedEventArgs("Total"));
}
}
Since the sample DelegateHolder is meant to be multi-purpose you'll probably want to do some refactoring to come up with a cleaner design than this.