コード例 #1
0
        public override bool EndEdit()
        {
            BrowseEditorElement editor = (BrowseEditorElement)this.EditorElement;

            editor.TextBox.TextChanging -= new TextChangingEventHandler(TextBox_TextChanging);
            editor.TextBox.TextChanged  -= new EventHandler(TextBox_TextChanged);
            editor.TextBox.KeyDown      -= new KeyEventHandler(TextBox_KeyDown);
            editor.Button.Click         -= new EventHandler(Button_Click);
            return(base.EndEdit());
        }
コード例 #2
0
        public override void BeginEdit()
        {
            base.BeginEdit();
            BrowseEditorElement editor = (BrowseEditorElement)this.EditorElement;

            editor.TextBox.SelectAll();
            editor.TextBox.HostedControl.Focus();
            editor.TextBox.TextChanging += new TextChangingEventHandler(TextBox_TextChanging);
            editor.TextBox.TextChanged  += new EventHandler(TextBox_TextChanged);
            editor.TextBox.KeyDown      += new KeyEventHandler(TextBox_KeyDown);
            editor.Button.Click         += new EventHandler(Button_Click);
        }
コード例 #3
0
        void Button_Click(object sender, EventArgs e)
        {
            endEditOnLostFocus = false;
            BrowseEditorElement editor = (BrowseEditorElement)this.EditorElement;
            OpenFileDialog      dialog = new OpenFileDialog();

            dialog.Filter   = filter;
            dialog.FileName = editor.TextBox.Text;
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                editor.TextBox.Text = dialog.FileName;
            }
            //editor.TextBox.SelectAll();
            //editor.TextBox.Focus();
            endEditOnLostFocus = true;
            ((RadGridView)editor.ElementTree.Control).EndEdit();
        }