473,408 Members | 1,874 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,408 software developers and data experts.

Sorry for asking again, but i'm having problems with datagird...

i want the enter key press wll be an event
this is my eventhandler header
this.dataGrid1.KeyPress+=new System.Windows.Forms.KeyPressEventHandler(this.dat aGrid1_KeyPress)
is it ok
and how do i write the method, the datagrid doesn't react when i press any key (i tried to debug and i saw that nothing happens when i press any key

i read the link that i got from here but it didn't help me to understand how to do it..
thnak yo
Nov 16 '05 #1
1 1120
Hi,

With the grid, it's not that simple.

You can intercept the Enter keystroke by inheriting from the grid and
overriding the following methods:

ProcessCmdKey
ProcessKeyPreview
ProcessDialogKey

The first one might me unnecessary to override, I might have used it to
catch only some very grid-specific keystrokes like the Del key.

"Gidi" <an*******@discussions.microsoft.com> wrote in message
news:AE**********************************@microsof t.com...
i want the enter key press wll be an event.
this is my eventhandler header:
this.dataGrid1.KeyPress+=new System.Windows.Forms.KeyPressEventHandler(this.dat aGrid1_KeyPress); is it ok?
and how do i write the method, the datagrid doesn't react when i press any key (i tried to debug and i saw that nothing happens when i press any key)
i read the link that i got from here but it didn't help me to understand how to do it... thnak you


Nov 16 '05 #2

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

Similar topics

0
by: Freddy | last post by:
I have 2 tables in a dataset. One of them is child to the other. In my dataset, I specify both default views to allowdelete = false My datasource table of the datagird is the master table...
8
by: jon morgan | last post by:
OK, I'm going to be brave. There is a bug in VS.Net 1.1 that causes random compiler errors. I have raised this issue in posts at least three time in the past couple of months without attracting...
11
by: Steven T. Hatton | last post by:
In the past there have been lengthy discussiions regarding the role of header files in C++. People have been very adamat about header files serving as in interface to the implementation. I do...
0
by: timon | last post by:
I have create a Datagird in the window form. How can I set the column name in the datagird?
2
by: moondaddy | last post by:
My default page stays constant in the site and all the content in the body of the page is produced with user controls in a table cell for the body section. The main function of this site is a...
2
by: Gaurav Gargate | last post by:
To Group, I am creating a datagrid in an ASP.NET project (C#) at the design time. I will be adding the columns to the datagird at run time. The number of columns, name of the columns, data in...
3
by: Bill Nguyen | last post by:
Once applied the latest security patches from Microsoft, OL on our VB app client machines keep popping up dialog box asking for permission to send mail using OL. Is there anyway to by pass this...
1
by: Kiran | last post by:
Hi, Does any one know how to add a button to every row of a windows form datagird. Can anyone provide me some code on this. I have searched a lot but couldn't find any. I am posting this for...
0
by: skip | last post by:
Manish> It does not work. I had already tried this earlier. Manish> Please suggest some other solutions. Manish> Also, I would like to see the stack from where the exception Manish> started. ...
21
by: Phil Powell | last post by:
<script type=\"text/javascript\"> <!-- var browserArray = new Array(\"Microsoft Internet Explorer\", \"Netscape\"); if (browserArray.in_array(navigator.appName, browserArray) &&...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.