M
Mike Kiefer
I have a DataSet with two DataTables: Stores and CartItems. There is a data
relation called "StoreCartItem" that makes the CartItems table a child of
the Stores table. In the CartItems table I have a simple computed column
called ExtendedPrice with an expression of "PerItemPrice*Quantity". In the
Stores table I have a computed column called "Subtotal" with the expression:
"Sum(Child(StoreCartItem).ExtendedPrice)"
For the most part, everything works fine. When I add a new CartItem or
change the quantity for an existing CartItem, the Subtotal column of the
parent table is updated properly. However, the Subtotal column is not
updated in the corresponding parent row if I delete a CartItem using the
DataRow.Delete() method. I have managed to work around this problem by first
setting Quantity=0 and then immediately deleting the CartItem. It seems like
a bug that I must do it this way. Has anyone else experienced this? Is there
something else I should be looking for?
Thanks in advance,
Mike
relation called "StoreCartItem" that makes the CartItems table a child of
the Stores table. In the CartItems table I have a simple computed column
called ExtendedPrice with an expression of "PerItemPrice*Quantity". In the
Stores table I have a computed column called "Subtotal" with the expression:
"Sum(Child(StoreCartItem).ExtendedPrice)"
For the most part, everything works fine. When I add a new CartItem or
change the quantity for an existing CartItem, the Subtotal column of the
parent table is updated properly. However, the Subtotal column is not
updated in the corresponding parent row if I delete a CartItem using the
DataRow.Delete() method. I have managed to work around this problem by first
setting Quantity=0 and then immediately deleting the CartItem. It seems like
a bug that I must do it this way. Has anyone else experienced this? Is there
something else I should be looking for?
Thanks in advance,
Mike