/// <summary> /// Create the editor control /// </summary> /// <returns></returns> protected override Control CreateControl() { DevAge.Windows.Forms.DevAgeTextBoxButton editor = new DevAge.Windows.Forms.DevAgeTextBoxButton(); editor.BorderStyle = DevAge.Drawing.BorderStyle.None; editor.Validator = this; return editor; }
/// <summary> /// Create the editor control /// </summary> /// <returns></returns> protected override Control CreateControl() { DevAge.Windows.Forms.DevAgeTextBoxButton editor = new DevAge.Windows.Forms.DevAgeTextBoxButton(); editor.BorderStyle = DevAge.Drawing.BorderStyle.None; editor.Validator = this; return(editor); }
/// <summary> /// This method is called just before the edit start. You can use this method to customize the editor with the cell informations. /// </summary> /// <param name="cellContext"></param> /// <param name="editorControl"></param> protected override void OnStartingEdit(CellContext cellContext, Control editorControl) { base.OnStartingEdit(cellContext, editorControl); DevAge.Windows.Forms.DevAgeTextBoxButton editor = (DevAge.Windows.Forms.DevAgeTextBoxButton)editorControl; //to set the scroll of the textbox to the initial position (otherwise the textbox use the previous scroll position) editor.TextBox.SelectionStart = 0; editor.TextBox.SelectionLength = 0; }
/// <summary> /// This method is called just before the edit start. You can use this method to customize the editor with the cell informations. /// </summary> /// <param name="cellContext"></param> /// <param name="editorControl"></param> protected override void OnStartingEdit(CellContext cellContext, Control editorControl) { base.OnStartingEdit(cellContext, editorControl); DevAge.Windows.Forms.DevAgeTextBoxButton editor = editorControl as DevAge.Windows.Forms.DevAgeTextBoxButton; //[email protected]: Check to validate control if (editor == null) { return; } //to set the scroll of the textbox to the initial position (otherwise the textbox use the previous scroll position) editor.TextBox.SelectionStart = 0; editor.TextBox.SelectionLength = 0; }