Edit events not being fired

May 26, 2009 at 10:47 AM


I'm relatively new to WPF and I'm using the Datagrid from the latest version of the toolkit.

The datagrid is bound to a list and I want to be able to recalculate a cell in the grid when the value in one of the other cells is changed.  I thought I could do this by using the CellEditEnding event but this doesn't seem to get fired.  I've checked the BeginningEdit event and this doesn't seem to be fired either.   Other events such as GotFocus and LostFocus are being fired.

What am I doing wrong?


May 26, 2009 at 9:48 PM

BeginningEdit should fire when the cell is not readonly and the currentcell is not null.  Does the action you are doing meet this requirement?

May 27, 2009 at 8:05 AM

The cell is not readonly and the current cell is not null.  In fact I have managed to achieve what I wanted using GotFocus (to save CurrentItem) and LostFocus (to carry out the calculation I wanted to) and it works perfectly.  However, I always like to find out why something doesn't work. 

In fact when I was investigating further both BeginningEdit and CellEditEnding would fire occasionally but it seemed to be random and very sporadic.  It also seemed not to be linked to my current actions.  For example it would fire a BeginningEdit event and then immediately fire a CellEditEnding event without any further key strokes.

May 27, 2009 at 1:29 PM

What are the actions you are doing to initiate editing?