This is a migrated thread and some comments may be shown as answers.

ReadOnly Property is not updating....

3 Answers 391 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Wasif Jahangir
Top achievements
Rank 1
Wasif Jahangir asked on 13 Jul 2010, 11:59 AM
i have a "total" readonly field in my collection.
and it depends upon three other fields (quantity, Unit price, discount)
upon changing of any of these values i can see in debugging that the total property also changing,
but that is not reflecting in Grid Column of Total.
how to reflect the new value instantantly
however i have a simple Aggregate sum function in bottom which updating fine. but not the total Column field.

3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 13 Jul 2010, 12:02 PM
Hi Wasif Jahangir,

Does your business object implement INotifyPropertyChanged and do you raise it when it's needed?

Is it possible to send us a small dummy project that demonstrates this. We will debug it and see what is going on.

Thanks in advance.

Sincerely yours,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Wasif Jahangir
Top achievements
Rank 1
answered on 13 Jul 2010, 12:25 PM
sorry it would take me quite much time to create a sample however here some code snippet:

yes the collection have implemented INotifyPropertyChange interface.
here some code snippet.
foreach (Data.SupplierQuotationDetail detail in quotation.SupplierQuotationDetails)
{
               (detail as INotifyPropertyChanged).PropertyChanged += new PropertyChangedEventHandler(SupplierQuotation_PropertyChanged);
}

and in this event (SupplierQuotation_PropertyChanged) i can see the changes. and that collection (quotation.SupplierQuotationDetails) is bind to grid. but total field is not reflecting over there properly. do u have any sample for such case?
0
Accepted
Rossen Hristov
Telerik team
answered on 13 Jul 2010, 01:31 PM
Hi Wasif Jahangir,

I have prepared a sample project for you. There is a football club. It has columns for StadiumCapacity, TicketPrice and FullHouseProfit.

FullHouseProfit = StadiumCapacity * TicketPrice.

This is my calculated column.

Below the grid there is a button. Each time you click it, you will increase the ticket price of the stadium. You can clearly see how the FullHouseProfit is increased as a result of the ticket price change.

So everything works correctly. I event prepared a short video for you.

Could you please modify my sample project so that it reproduces the behavior that you are faced with.

Thanks in advance.

Regards,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Wasif Jahangir
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Wasif Jahangir
Top achievements
Rank 1
Share this question
or