refreshing datacolumn composed of expression?

V

VMI

I added a datacolumn in my table that includes data from two other
datacolumns joined together:
ColJoin.Expression = "Col1 + ' ' + Col2";
When a user chooses a row through the Windows grid , I use currency manager
to figure out what row the user picked:
DataRowView row =
(DataRowView)((CurrencyManager)BindingContext[(DataTable)dataGrid_auditAddress.DataSource]).Current;

Now, when I modify Col1 by editing the data ( row["Col1"] = "Joe" ) ,
ColJoin is supposed to concatenate the new Col1 value and the old Col2 value
(what the expression says) and put the new value in ColJoin. When I check
the new value of ColJoin, it has the same old value; it's as if the
expression is not recalculated. And I don't see the change in the datagrid.
But I do see the new value in Col1 ("Joe").

Can I refresh the original datarow or the grid with the new row?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top