473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to catch the enter key of TestBox in datagrid

mhw
How to catch the enter key of TestBox that DataGrid hits ?
Nov 17 '05 #1
7 3532
mhw
You can capture KeyPress event. and 13 is keyChar of Enter
search MSDN for example.

Best Regards,
Vuong
Tran Xuan
"mhw" <ma*****@vip.sina.com> wrote in message
news:ul*************@tk2msftngp13.phx.gbl...
How to catch the enter key of TestBox that DataGrid hits ?

Nov 17 '05 #2
mhw
I do not search it from MSDN.Can you tell me where?
Thanks!
"Vuong" <vu****@yahoo.com> дÈëÏûÏ¢ÐÂÎÅ:Og**************@TK2MSFTNGP12.phx.gbl ...
mhw
You can capture KeyPress event. and 13 is keyChar of Enter
search MSDN for example.

Best Regards,
Vuong
Tran Xuan
"mhw" <ma*****@vip.sina.com> wrote in message
news:ul*************@tk2msftngp13.phx.gbl...
How to catch the enter key of TestBox that DataGrid hits ?


Nov 17 '05 #3
mhw

Here is the link,
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformscontrolclasskeypresstopic.a sp

Best Regards
Vuong,
Tran Xuan

"mhw" <ma*****@vip.sina.com> wrote in message
news:OG*************@TK2MSFTNGP09.phx.gbl...
I do not search it from MSDN.Can you tell me where?
Thanks!
"Vuong" <vu****@yahoo.com>

дÈëÏûÏ¢ÐÂÎÅ:Og**************@TK2MSFTNGP12.phx.gbl ...
mhw
You can capture KeyPress event. and 13 is keyChar of Enter
search MSDN for example.

Best Regards,
Vuong
Tran Xuan
"mhw" <ma*****@vip.sina.com> wrote in message
news:ul*************@tk2msftngp13.phx.gbl...
How to catch the enter key of TestBox that DataGrid hits ?



Nov 17 '05 #4
mhw
Sorry,I ask how to catch the enter key of dataGridTextBox in DataGrid,and
you say that is TextBox.
Nov 17 '05 #5
mhw

Take a look at this
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformsdatagridtextboxmemberstopic .asp

DatagridTextBox also have a keypress Event. That's what you need.

Best Regards
Vuong,
Tran Xuan

"mhw" <ma*****@vip.sina.com> wrote in message
news:uW**************@TK2MSFTNGP10.phx.gbl...
Sorry,I ask how to catch the enter key of dataGridTextBox in DataGrid,and
you say that is TextBox.

Nov 17 '05 #6
One of the easiest way is create your own tablestyle and add an eventhandler
for DataGridTextBox column's TextBox properties key_up event

DataGridTableStyle dgt = new DataGridTableStyle();
dgt.MappingName = "NamesTable";

DataGridTextBoxColumn dgtbc = new DataGridTextBoxColumn();
dgtbc.MappingName = "Name";
dgtbc.HeaderText= "Name";
dgt.GridColumnStyles.Add(dgtbc);
dgt.TextBox.KeyUp+=your eventHandler goes here

myGrid.TableStyles.Add(dgt);
Dincer Uyav

"mhw" wrote:
Sorry,I ask how to catch the enter key of dataGridTextBox in DataGrid,and
you say that is TextBox.

Nov 17 '05 #7
mhw
Thanks,I do it yet. I can catch the keys that have not the Enter key.

"Dincer Uyav" <Di********@discussions.microsoft.com> дÈëÏûÏ¢ÐÂÎÅ:11**********************************@ microsoft.com...
One of the easiest way is create your own tablestyle and add an
eventhandler
for DataGridTextBox column's TextBox properties key_up event

DataGridTableStyle dgt = new DataGridTableStyle();
dgt.MappingName = "NamesTable";

DataGridTextBoxColumn dgtbc = new DataGridTextBoxColumn();
dgtbc.MappingName = "Name";
dgtbc.HeaderText= "Name";
dgt.GridColumnStyles.Add(dgtbc);
dgt.TextBox.KeyUp+=your eventHandler goes here

myGrid.TableStyles.Add(dgt);
Dincer Uyav

"mhw" wrote:
Sorry,I ask how to catch the enter key of dataGridTextBox in DataGrid,and
you say that is TextBox.

Nov 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: (Pete Cresswell) | last post by:
I've got KeyDown coding and it fires when other keys are pressed, but when Enter is pressed, nothing. I'd like to support the (standard?) Windows behavior of executing DblClick processing when...
0
by: mhw | last post by:
I want to catch "Enter" event of textbox in datagrid. How should i do ?
5
by: Niks | last post by:
I have a list control. On doubleclick of list item, a new dlg opens. Now, i want to handle 'OnEnter Key'also. i.e. When a list item is selected & Enter key is pressed, the new dlg shd open I tried...
1
by: marc-andr? | last post by:
Hi, I have to loop on each control on a webforms... I use this function : public void LoopOnAllControls(ControlCollection coll) { foreach (System.Web.UI.Control ctrl in coll) {
1
by: RAB | last post by:
I am opening a simple database and filling a DataGrid: The code is as follows: <%@ Page Language="VB" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.OleDb" %>
1
by: Saji .net | last post by:
how I can use control keys like enter in datagrid cell in vb.net?
1
by: Lars Netzel | last post by:
Hi, hope anyone can help me with this! I want the Enter button to let me move to the next row but in the same column sorta like in MS Excel Any ideas? best regards /Lars
2
by: Risen | last post by:
Hi,all, I want to capture the Datagrid's KeyPress Event, when I press Enter Key I can focus other. But I write some code in myDataGrid_KeyPress event, and when the focus in the cell, it dosn't...
11
by: Dick Moores | last post by:
Windows XP Pro, Python 2.5.1 import msvcrt while True: if msvcrt.kbhit(): key = msvcrt.getch() if key == 'Enter' do something Is there a way to catch the pressing of the 'Enter' key?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.