|
-
Jul 18th, 2008, 08:37 AM
#5
Re: [2008] DataGridViewTextBoxColumn - only allow certain characters
Handle the EditingControlShowing event of the grid. If the current column is the one you're interested in then EditingControl is a reference to the aforementioned DataGridViewTextBoxEditingControl and you can use AddHandler to attach the appropriate event handlers. Just note that you will need to use RemoveHandler to remove them again though, or you will likely end up with issues.
Note that a DataGridViewTextBoxEditingControl is just an inherited TextBox that implements IDataGridViewEditingControl, as are all controls that get embedded in a DataGridView.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|