Hi !
I would like to change the TAB key to ENTER key.
I has read the http://www.devexpress.com/Support/Center/p/Q182351.aspx article, but it is not clear for me, the method to change the TAB key to ENTER key.
THanks for your help
Best regard
Zoltan
How to make Enter on a (TextBox) Control act as TAB button in detailview
Answers
Hello Zoltan,
The easiest way to accomplish this task is to set the editor's EnterMoveNextControl property to true, as shown below:
C#public class ViewController1 : ViewController<DetailView> {
protected override void OnActivated() {
base.OnActivated();
foreach (DXPropertyEditor propertyEditor in View.GetItems<DXPropertyEditor>()) {
propertyEditor.ControlCreated += new EventHandler<EventArgs>(propertyEditor_ControlCreated);
}
}
void propertyEditor_ControlCreated(object sender, EventArgs e) {
((DXPropertyEditor)sender).Control.EnterMoveNextControl = true;
}
protected override void OnDeactivated() {
base.OnDeactivated();
foreach (DXPropertyEditor propertyEditor in View.GetItems<DXPropertyEditor>()) {
propertyEditor.ControlCreated -= new EventHandler<EventArgs>(propertyEditor_ControlCreated);
}
}
}
Please let me know if you need any further assistance.
Thanks,
Anatol