To avoid this bug, I remove the expression columns (see code below)
from the DataTable prior to saving the data. This miniscule task
takes about 2 seconds. 2 seconds may not seem like much, but it is.
public void RemoveExpressionColumns()
{
try
{
if (this.transactionLineTable.Columns.Contains("LineNo"))
this.transactionLineTable.Columns.Remove(this.lineNoColumn);
if (this.transactionLineTable.Columns.Contains("Sign"))
this.transactionLineTable.Columns.Remove(this.signColumn);
if (this.transactionLineTable.Columns.Contains("Difference"))
this.transactionLineTable.Columns.Remove(this.differenceColumn);
}
catch(Exception ex)
{
System.Windows.Forms.MessageBox.Show("RemoveExpressionColumns:\r\n"
+ ex.ToString());
}
}
Has anyone else overcome the expression column issue in another way?
Any suggestions?
I suppose I could catch the RowChanged event, and calculate the
expressions using code and directly update the so-called expression
columns...?
Mario T. Lanza
Clarity Information Architecture, Inc.