Datagrid entering in edit mode with focus using TemplateColumns

Apr 21, 2009 at 4:14 PM
Hi,

How can i enter automatically in edit mode with focus on the first focusable control located inside a DataGridTemplateColumn.CellEditingTemplate, when i select a cell in a datagrid with mouse click or cursor keys, if all my datagrid columns are defined with DatagridTemplateColumns ?

Thanks.

Rui G.
Coordinator
Apr 21, 2009 at 9:58 PM
RuiG,

http://wpf.codeplex.com/Wiki/View.aspx?title=Single-Click%20Editing&referringTitle=Home
This article describes how to enter edit mode with single click. In your case you mkight want to do this in the PreviewMouseLeftButtonDown event handler of your first focusable control.

Thanks.