protected override void OnKeyDown(KeyEventArgs e) { RadDateTimePickerElement editorElement = this.EditorElement as RadDateTimePickerElement; if (editorElement == null || !editorElement.IsInValidState(true)) { return; } TreeNodeElement ownerElement = this.OwnerElement as TreeNodeElement; if (ownerElement == null) { return; } if (e.KeyCode == Keys.Return) { ownerElement.TreeViewElement.EndEdit(); } else if (e.KeyCode == Keys.Escape) { ownerElement.TreeViewElement.CancelEdit(); } else { base.OnKeyDown(e); } }
protected virtual void OnKeyUp(KeyEventArgs e) { RadDateTimePickerElement editorElement = this.EditorElement as RadDateTimePickerElement; if (editorElement == null || !editorElement.IsInValidState(true)) { return; } bool flag = string.IsNullOrEmpty(editorElement.TextBoxElement.TextBoxItem.HostedControl.Text); switch (e.KeyCode) { case Keys.Left: if (!this.isLeftmostMaskItemSelected && !flag) { break; } base.OnKeyDown(e); this.isLeftmostMaskItemSelected = false; break; case Keys.Right: if (!this.isRightmostMaskItemSelected && !flag) { break; } base.OnKeyDown(e); this.isRightmostMaskItemSelected = false; break; } }
public override void OnKeyDown(KeyEventArgs e) { RadDateTimePickerElement editorElement = this.EditorElement as RadDateTimePickerElement; if (editorElement == null || !editorElement.IsInValidState(true)) { return; } if (e.KeyCode == Keys.Return || e.KeyCode == Keys.Escape) { base.OnKeyDown(e); } else if (e.KeyCode == Keys.Right) { this.isRightmostMaskItemSelected = this.IsRightmostMaskItemSelected(); } else if (e.KeyCode == Keys.Left) { this.isLeftmostMaskItemSelected = this.IsLeftmostMaskItemSelected(); } else { editorElement.NullDate = DateTime.MinValue; } }
protected override void OnKeyDown(KeyEventArgs e) { RadDateTimePickerElement editorElement = this.EditorElement as RadDateTimePickerElement; if (editorElement == null || !editorElement.IsInValidState(true)) { return; } BaseListViewVisualItem ownerElement = this.OwnerElement as BaseListViewVisualItem; if (ownerElement == null) { return; } if (e.KeyCode == Keys.Return) { ownerElement.Data.Owner.EndEdit(); } else if (e.KeyCode == Keys.Escape) { ownerElement.Data.Owner.CancelEdit(); } else { base.OnKeyDown(e); } }
protected override void OnKeyDown(KeyEventArgs e) { RadDateTimePickerElement dateTimePickerElement = this.EditorElement as RadDateTimePickerElement; if (dateTimePickerElement == null || !dateTimePickerElement.IsInValidState(true)) { return; } PropertyGridItemElement visualItem = this.OwnerElement as PropertyGridItemElement; if (visualItem != null) { if (e.KeyCode == Keys.Enter) { visualItem.PropertyTableElement.EndEdit(); } else if (e.KeyCode == Keys.Escape) { visualItem.PropertyTableElement.CancelEdit(); } else { base.OnKeyDown(e); } } }
protected virtual void OnKeyDown(KeyEventArgs e) { RadDateTimePickerElement dateTimePickerElement = this.EditorElement as RadDateTimePickerElement; if (dateTimePickerElement == null || !dateTimePickerElement.IsInValidState(true)) { return; } if (this.OwnerElement != null) { if (e.KeyCode == Keys.Right) { isRightmostMaskItemSelected = this.IsRightmostMaskItemSelected(); } else if (e.KeyCode == Keys.Left) { isLeftmostMaskItemSelected = this.IsLeftmostMaskItemSelected(); } else { dateTimePickerElement.NullDate = DateTime.MinValue; } } }