471,337 Members | 1,107 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

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

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:
<code>
public PMDDataGridViewTextBoxEditingControl()
:base()
{
this.Multiline = true;
}
</code>

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

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
0 1721

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Henok Girma | last post: by
3 posts views Thread by Art | last post: by
7 posts views Thread by =?Utf-8?B?TG9zdEluTUQ=?= | last post: by
4 posts views Thread by =?Utf-8?B?VGVycnk=?= | last post: by
1 post views Thread by Landry, Eric | last post: by
9 posts views Thread by Miro | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.