Hi
I've used the following code to intercept a KeyEvent into a DataGrid.
******************************************
Private Sub DataGrid1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles DataGrid1.KeyDown
' Check if F2 Key is pressed.
If e.KeyCode = Keys.F2 Then
' Key pressed, Show MsgBox
MsgBox("F2 Key pressed!", MsgBoxStyle.Exclamation, "Ok, event Intercepted")
End If
End Sub
******************************************
When the cursor is into a cell of my DataGrid, the MsgBox doesn't appear. If I select, by example, the caption text part of the DataGrid control and then I press F2 Key, the event is intercepted and MsgBox appear!
But I don't want it. I want intercept the event when the cursor is located into a cell of my DataGrid!
What should I do to intercept that event?
Thanks in advance
-----------------------
Nicola Baldi 2 1614
Hi, http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q836q
Ken
--------------
"Nicola Baldi" <na*****@email.it> wrote in message
news:0A**********************************@microsof t.com... Hi! I've used the following code to intercept a KeyEvent into a DataGrid.
****************************************** Private Sub DataGrid1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles DataGrid1.KeyDown ' Check if F2 Key is pressed. If e.KeyCode = Keys.F2 Then ' Key pressed, Show MsgBox MsgBox("F2 Key pressed!", MsgBoxStyle.Exclamation, "Ok, event
Intercepted") End If End Sub ******************************************
When the cursor is into a cell of my DataGrid, the MsgBox doesn't appear.
If I select, by example, the caption text part of the DataGrid control and
then I press F2 Key, the event is intercepted and MsgBox appear! But I don't want it. I want intercept the event when the cursor is located
into a cell of my DataGrid! What should I do to intercept that event?
Thanks in advance. ------------------------ Nicola Baldi
Hi, http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q836q
Ken
--------------
"Nicola Baldi" <na*****@email.it> wrote in message
news:0A**********************************@microsof t.com... Hi! I've used the following code to intercept a KeyEvent into a DataGrid.
****************************************** Private Sub DataGrid1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles DataGrid1.KeyDown ' Check if F2 Key is pressed. If e.KeyCode = Keys.F2 Then ' Key pressed, Show MsgBox MsgBox("F2 Key pressed!", MsgBoxStyle.Exclamation, "Ok, event
Intercepted") End If End Sub ******************************************
When the cursor is into a cell of my DataGrid, the MsgBox doesn't appear.
If I select, by example, the caption text part of the DataGrid control and
then I press F2 Key, the event is intercepted and MsgBox appear! But I don't want it. I want intercept the event when the cursor is located
into a cell of my DataGrid! What should I do to intercept that event?
Thanks in advance. ------------------------ Nicola Baldi This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: jinu |
last post by:
In a vb.net application, we are using the DataGridColoredTextBoxColumn class
which is derived from DataGridTextBoxColumn class inorder to give additional
colouring features.
For aligning certain...
|
by: Tamir Khason |
last post by:
How to prevent the selected cell from being editable (visual) at DataGrid?
Once click on cell (even readonly) there are cursor inside it and select
text appears. How to prevent it
Thankx
|
by: Moshe Lupiansky via .NET 247 |
last post by:
(Type your message here)
1 - How do I programmatically assign a value to a specified cell in a DataGrid? Something like DataGrid1(3,8) = "ABC"
2 - When I am going to the last row (the empty...
|
by: DraguVaso |
last post by:
Hi,
I'm able to set the Font in a Datagrid-Cell to Bold with
g.DrawString(Me.GetColumnValueAtRow(source, rowNum).ToString, e.TextFont,
e.ForeBrush, bounds.X, bounds.Y)
and to Align the text...
|
by: Nicola Baldi |
last post by:
Hi
I've used the following code to intercept a KeyEvent into a DataGrid.
******************************************
Private Sub DataGrid1_KeyDown(ByVal sender As Object, ByVal e As...
|
by: Lars Netzel |
last post by:
I want a datagrid cell to be a combobox (based on database records) and when
you select a value in the combobox I want to add info to cells on the same
row in the datagrid but with More info from...
|
by: Karl |
last post by:
Hi there,
I have a problem needs help.
In a winform, I have a datagrid.
In Mouse move event, I can get coodinates of Mouse. I want to decide which
datagridcell my mouse is on. Can anybody...
|
by: Doug Bell |
last post by:
Hi
I have a DataGrid with some hidden columns and also some read Only and some
ComboBox Columns.
Sandard Tabbing through the Datagrid sees the focus go to the hidden columns
requiring further...
|
by: Smish |
last post by:
hey can ne1 tell me how to color the corner of a cell in the datagridview
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |