在输入单击时显示gridview [英] display gridview on enter click
本文介绍了在输入单击时显示gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,我有一个文本框和一个gridview.
最初,gridview是隐藏的,我使用模式弹出扩展程序在文本框click上显示gridview.
在文本框上单击鼠标,将显示网格视图.
现在,我需要在文本框中的ENTER单击(即从键盘输入)上显示gridview,而不要与其他任何其他视图一起显示.有人可以帮忙吗?
谢谢.
Hello, I have a textbox and a gridview.
Initially the gridview was hidden, I used modal popup extender to display gridview on textbox click.
On textbox mouse click, I will get the gridview displayed.
Now, what I need is to display the gridview on ENTER Click (i.e., from keyboard) in the textbox and not with any other. Can anyone help?
Thanks.
推荐答案
private void TextBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
DataGridView1.Visible = true;
}
}
这篇关于在输入单击时显示gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文