By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,978 Members | 1,831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,978 IT Pros & Developers. It's quick & easy.

Re: DataGridView: Need to make Enter key create newline in textbox

P: n/a
to this newline when an enter key is detected.
My question (finally!) is if this is a sound solution? It works, but
feels "hacky" to me and I suspect I may be missing a more elegant solution.

Anyone have any ideas?
Update: I tried adding this code:
public PMDDataGridViewTextBoxEditingControl()
this.Multiline = true;

This has no effect, I still need to insert the Environment.NewLine

It's strange, DataGridViewTextBoxEditingControl derives from TextBox,
I'm not clear where the different behavior is being introduced. In
other words, if I create a multiline TextBox control I can press enter
and get a newline, so why with this DGV control is the behavior different?
Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.