To reproduce:
1. Add a RadTreeView with several nodes
2. Subscribe to the EditorRequired event and specify the editor to TreeViewTextBoxEditor where its Multiline property is set to true.
3. Select a node and press F2. The editor is activated. However, when you enter some text and press Ctrl+Enter, the editor is closed. The expected behavior is that a new line is inserted.
Workaround:
private void radTreeView1_EditorRequired(object sender, TreeNodeEditorRequiredEventArgs e)
{
CustomTreeViewTextBoxEditor editor = new CustomTreeViewTextBoxEditor();
editor.Multiline = true;
e.Editor = editor;
}
public class CustomTreeViewTextBoxEditor : TreeViewTextBoxEditor
{
protected override void OnKeyDown(KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter &&
e.Modifiers == Keys.Control &&
this.Multiline)
{
return;
}
base.OnKeyDown(e);
}
}