Total Property - Binding Issue

Total Property - Binding Issue

Old forum URL: forums.lhotka.net/forums/t/1485.aspx


Tim FOrd posted on Saturday, October 14, 2006

Hi,

I have 2 classes Quotation(BusinessBase) and QuotationProductItems(BusinessListBase)

I have a property on Quotation called QuoteProductItems that links to the QuotaitonProductItems class

I have created a property on the Quotation Class called Total with loops through all the QuotationProductItems and sums the price.

The issues i'm having is that i have bound the Total property to a text box however when i add a new item to QuoteProductItems it does not resum the items, can anyone tell me how to refire the property to update the text box.

Any help would be great.

Thanks, Tim.

xal replied on Saturday, October 14, 2006

You would have to listen to the ListChanged event of the list and call PropertyHasChanged("Total").
If the prices on the child items are editable, you also have to listen to the children's propertychanged and do the same thing...

You could also use the observer (csla.kozul.info).

Andrés

Copyright (c) Marimer LLC