Travis Banger
Travis Banger

Reputation: 717

WPF DataGrid: How to discriminate between the 2 calls to event handler dataGrid_CurrentCellChanged?

For some reason, the CurrentCellChanged() event handler is triggered twice:

(a) When the user clicks in a cell. I would like to ignore that one.

(b) When the user has edited the cell content. This is the one I want to catch.

How can I tell the two calls apart?

TIA

Upvotes: 0

Views: 347

Answers (1)

d.moncada
d.moncada

Reputation: 17402

What you want to use is the CellEditEnding event instead.

See more info here: http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid.celleditending(v=vs.110).aspx

Upvotes: 1

Related Questions