I have a datagridview bound from a datatable. I have a calculated column linetotal that multiples unitprice * quantity.
I also have a totalprice label,that I would
Every time you need to refresh the calculated data column, just use again the assignement of expresion. It works for me.
dt.Columns["Linetotal"].Expression = "[unitprice] * [quantity]"
verbi gratia in my code
private void malla18_Mask_Validated(object sender, EventArgs e)
{
analisis_Tabla_Lote.Columns["SUMA_MALLAS"].Expression = "100 - (Malla12 + Malla14 + Malla15 + Malla16 + Malla17 + Malla18 )";
analisis_BindingSource.ResetBindings(false);
}
That's all you need!