Re: Expression Column doesn't refresh by Fei
Fei
Fri Dec 05 08:03:55 CST 2003
Jeffrey,
Thanks for your suggestions!
I did try. But both solutions don't work. I use Infragistics grid, and
delete one child record from grid, then I do update, and acceptchanges. It
didn't work.
Fei
"Jeffrey Huntsman" <jhuntsman@__nospam__teletracking.com> wrote in message
news:eqCqG1ruDHA.2880@tk2msftngp13.phx.gbl...
> I'd bet that you would need to update the dataset in order to see the
> change. This is because when you Delete a row, it is not physically
deleted.
> It still exists in the Rows collection, just that it's state has been
> changed.
>
> 2 solutions: physically update the dataset using your DataAdapter.Update
> method, or just call DataSet.AcceptChanges and see if your total is then
> computed correctly.
>
> Jeffrey
>
>
> "Fei" <fwang@csystemssoftware.com> wrote in message
> news:uyF0firuDHA.3196@TK2MSFTNGP11.phx.gbl...
> > Hi,
> >
> > I have a problem. I have no any clue about this. Please help me to
> figure
> > it out.
> >
> > I have a Customers table and Orders table. There is a relation,named
> > "Customer2Orders", between Customers (parent table) and Orders (child
> table)
> > on CustomerID. One Customer may have multiple Orders. I have an
expression
> > column 'Total' in Customers table. It is computed based on the child
> table's
> > column InvoiceAmount, i.e. Total =
> > Sum(Child(Customer2Orders).InvoiceAmount). If I add a child record,
Total
> is
> > computed automatically. But if I delete a child record, Total is not
> > reflected. It still keeps the old value which is wrong.
> >
> > Thanks in advance!
> >
> > Fei
> >
> >
>
>