473,405 Members | 2,187 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,405 software developers and data experts.

Not working shortcut key when Datagrid has focus

hi
I am working on window appication.
and i have put a shortcut key for different action like say F1 is press then new record etc like that

now when i have focus in datagrid i am getting keydown when working in datagrid cell so i am not getting which key is pressed and am not able to make my shortcut working.
plz give me some solution
Nov 23 '06 #1
2 1561
sivadhas2006
142 100+
Hi,

Can you post your code?

Check the Form Design Time KeyPreview Property.

Regards,
M.Sivadhas.
Nov 23 '06 #2
Hi,

Can you post your code?

Check the Form Design Time KeyPreview Property.

Regards,
M.Sivadhas.
Here is code for u.
In the forms load event i added hanler for handling keydown event
AddHandler CType(dgcharge.TableStyles(0).GridColumnStyles(1), DataGridTextBoxColumn).TextBox.KeyDown, AddressOf txtChargecode_KeyDown


And here is my key down event
Select Case e.KeyCode
Case Keys.F1
cmdnew_Click(cmdnew, e)
Case Keys.F2
cmdmodf_Click(cmdmodf, e)
Case Keys.F3
cmdsave_Click(cmdsave, e)
Case Keys.F4
cmdcancl_Click(cmdcancl, e)
Case Keys.F5
cmdDelete_Click(cmdDelete, e)
Case Keys.F12
cmdexit_Click(cmdexit, e)
End Select
Nov 25 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Nick | last post by:
In VS 2003 and VS 2005 beta 2 I am trying to write a simple program. It has a datagrid and a textbox along with a menubar. There is a command in the menu bar which is "Run Query" and has the...
1
by: Matthew | last post by:
C# Component Shortcut Key Event Focus We have created our own checkbox component. By capturing the KeyDown and KeyUp events the checkbox steps through a string containing a list of the valid...
4
by: Shravan | last post by:
Hi All, I am working with Windows Forms DataGrid. I am suffering with the problem described in Knowledge base article. 815252 - Form Key Events Are Not Raised When You Type in a DataGrid...
0
by: Saper\(ek\) | last post by:
this is a strange behavior of buttons with shortcut keys, when You have a datagrid on a form and some buttons with shortcut keys. When You click on the datagrid (anywhere but the cells, free space,...
0
by: Marcel | last post by:
Hi, the application I am writing has a MainMenu and a DataGrid (UltraGrid). Now I have to edit the text of each cell in this grid. So far so good. All works fine in editmode but if I press a...
1
by: Gidi | last post by:
Hi, I have DataGrid table and TextBox in my form. the table contains names and i use the textBox to enter letters to search specific customer. i want that the user will be able to navigate the...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
7
by: marty.overdear | last post by:
I am opening a new window using window.open. I need the new window to open on top of the parent everytime. I cannot use onBlur b/c the user will need to click back to the parent for information. ...
0
by: kandi | last post by:
Hi I have connected some forms through short-cut keys. When i initially enters in the root form, and if the focus in on JtextComponent, the short-cut ctrl-shift-o does not works. More...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
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...
0
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...
0
Oralloy
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,...
0
agi2029
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,...
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.