首页 新闻 赞助 找找看

c#datagridview 回车后系统设为换列,不要换行,怎操作

0
悬赏园豆:100 [已解决问题] 解决于 2009-02-18 13:38

c#datagridview

我在点中的单无格回车时,光标能自动的跳到旁边那一单元格中

swguo的主页 swguo | 初学一级 | 园豆:0
提问于:2009-02-17 11:50
< >
分享
最佳答案
-1

<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} @font-face {font-family:"\@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:42.55pt; mso-footer-margin:49.6pt; mso-paper-source:0; layout-grid:15.6pt;} div.Section1 {page:Section1;} -->

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Enter)
{
System.Windows.Forms.SendKeys.Send("{tab}");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}

用上面这个改写datagridview控件,或按键事件中写。总之,解决的方法就是把回车事件改成其他事件

鹰击长空 | 初学一级 |园豆:185 | 2009-02-17 12:34
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册