Take the 2-minute tour ×

I have a WPF DataGrid and i want to show a completion list below the cell currently being edited. I cannot seem to find a way to get the uncommitted value. I tryed catching all key down events but cannot find where the value is stored until it is committed.

share|improve this question
add comment

2 Answers

How about using the AutoCompleteBox from the WPF Toolkit in a DataGridTemplateColumn? (Sounds like it addresses your problem).

share|improve this answer
+1, using existing tools is always better than reinventing the wheel (and the whole point of WPF is to use bindings and templates) –  Alex Paven Oct 26 '10 at 20:40
+1 AutoCompleteBox is handy! –  Prince Ashitaka Oct 27 '10 at 4:34
add comment

Use the PreviewKeyDown event to get the actual value of the key that was pressed. You can then extract the DataRowView and the CurrentCell.Column.DisplayIndex from the sending object, that will give you the current cell contents without the new key that was pressed.

share|improve this answer
add comment

Your Answer


