Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Having KeyDown Enter and Modify a Custom XamDataGrid Cell
posted

Regarding this post on how to embed custom controls in a XamDataGrid, I am having some problems when I want to modify it to do the following:

  1. Have the CellClickAction be SelectCell
  2. Catch the PreviewKeyDown event to enter edit mode and replace the contents (like excel)

When I enter edit mode in PreviewKeyDown, the OnKeyDown override is called in the ControlHostEditor (ValueEditor) but this key stroke does not get propagated to the control in the EditTemplate. As a result, the value is not replaced and the previous value remains.