Hi all.
I 'm playing with parent/child relationship columns and I've tried
AGGREGATE functions.
My test is simple:
I've created a table "C" with 2 columns:
"Price" and "P_ID"
and a table "P" with 2 columns
"P_ID" as primary key and
"SumPrice" to contain computed values.
I've created a relationship
PCol = ds.Tables["P"].Columns["P_ID"];
CCol = ds.Tables["C"].Columns["P_ID"];
rel = new DataRelation("P_C_rel",PCol, CCol);
and added to the dataset.
Then I've specified an expression for the column SumPrice
SumPriceCol.Expression = "Sum(Child.Price)";
It works fine if I change only table "C" "Price" elements but it
doesn't work if I change table "C" "P_ID" elements.
It seem like it doesn't refresh value immediately when i change row,
but it processes changes one step later.
In fact if I change again "P_ID" values, computed column displays a
value that was correct with the previous input.
Surely I'm missing something.
Can someone help, please?
Thanks.
Maurizio.
|