Hello Rei,
Everything is happening as per expectations. Let me explain this, more or less all of the Xceed Grid's element are derived from WPF's UIElement. Somewhat similar to our normal xaml pages wherein we have a Grid, in which we place StackPanels, Canvases and other controls, we further add controls, buttons textboxes, Images etc to these containers. In the same manner an Xceed Grid can be thought of a container containg DataRows and DataRows in turn contain DataCells. The WPF routed event travels the same way up/down the Xceed Grid as it would have travelled in any other WPF neseted elements.
Now coming back to our objective, since we need to handle the LostFocus event of cell and not the entire grid, we need to handle the event of DataCell and not the DataGridControl.
This can be achieved very easily by writing a style targetting all DataCells. So define the following style in your page resources;
<Style TargetType="{x:Type xcdg:DataCell}">
<EventSetter Event="LostFocus" Handler="myCellLostFocusHandler" />
</Style>
And define the handler:
private void myCellLostFocusHandler(object sender, RoutedEventArgs e)
{
//do the needfull
}
Hope it helps.
Thanks
Abdullah Ansari
Senior Software Engineer
Outworks Solutions Private Limited
Everything is okay in the end. If its not okay, then its not the end.