DataGridCell lost focus of editing control event

Apr 23, 2009 at 8:28 PM
Hi,

I have a requirement where a check is done when a user leaves (lostFocus?) a cell on a datagrid. The check could be something like making sure they input a number, or call some special business rule.

The question I have is, I don't want this event to fire if they're leaving the normal viewing cell in the grid, I only want this to fire when they leave the textbox-type control inthe grid (after they've entered their value).

What's the best way to do this?

Thanks,
Chris
Coordinator
Apr 23, 2009 at 9:31 PM
What if you just set validation rules on just the bindings of the DataGridTextColumns?  Are you already familiar with the binding validation framework?
Apr 23, 2009 at 9:39 PM
Hi Vinsibal,

I am not familiar with the binding validation framework, do you have an example? I've got our own 'custom' business validation rule objects that I'm using elsewhere, but maybe I can plug these in here.


Thanks,
Chris
Coordinator
Apr 23, 2009 at 10:51 PM
This shows examples of item level validation and binding validation, http://www.codeproject.com/KB/WPF/WPFDataGridExamples.aspx#validation.