DataGridTextColumn LostFocus event?

May 28, 2009 at 6:51 PM

I have a business entitiy object that is databound to my grid.   It is bound to  DataGridText Column.   I want to trigger some calculations on my business entity after the user enters the value into the DataGridTextColumn.  

I was able to do this using DataGridTemplateColumn  and tying into the LostFocus  event however,  if I change to using a DataGridText Column, there does not appear to be a LostFocus event.

I'd like to keep as skinny as possible so am hoping to stay away from DataGridTemplateColumn   whereever possible. 


Tying to the grid's CellEditEnding event is not helpful because if fires before the data is transfered to the business object (it is an "Ending" event and not an "Ended") event.

Is there a similiar event I can use such as a CellEditEnded or a CellLostFocus when using the DataGridText Column?

I''ve got a looming deadline ...any help is welcome!

May 29, 2009 at 6:36 AM

Isn't this sort of thing better accomplished in a UI-independent way, such as inside your business object? Whatever mutator logic you have could do those calculations and update the other properties as well. If you are implementing INotifyPropertyChanged, any consumer of the object will then visualize the updates in whatever way is appropriate for that control.