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

Prevent leaving a DataGridViewCell

JB
Hi All,

I have a DataGridView issue.
One of the columns in my DataGridView control is a combo box. I want
the user to be able to edit the value as well as choosing it from the
drop down list. To achieve this, in the EditingControlShowing event, I
change the Combo box Control to ComboBoxStyle.DropDown.
It works fine, but if I'm editing the value in the cell and press any
of the Left, Right, Up or Down keys, the focus immediately leaves the
current cell.
I can't seem to capture the keypressed or keydown events while the
cell is in edit mode.
Can anybody help me out?

Thanks
JB
Oct 11 '08 #1
0 1076

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

Similar topics

7
by: JimO | last post by:
I teach HS computers and one of my kids has a web site with a textbox of info that the user can scroll down and read. The problem is that users can also enter text into it. Is there a way, or a...
5
by: EqDev | last post by:
I have a class that is a control derived from UserControl. I want to use serialization and deserialization with this calss but I get an exception "Cannot serialize member...
3
by: William E Voorhees | last post by:
I have code (using the leave event) in a textbox which prevents the user from leaving the box if it is blank. I would like the user to be able to click on the button of the form and close that...
1
by: John J. Hughes II | last post by:
I am trying to create a custom DataGridViewCell which is "NOT" derived from DataGridViewTextBoxColumn. The painting works fine but I am unable to get the control into edit mode. Do I need to...
2
by: mldebondt | last post by:
Hi, I'm rewriting a cms for Mozilla and it uses designMode. My problem is that the cursor can leave the editing div-element so the functions don't work correctly. How can I prevent the cursor...
3
by: Daniel Manes | last post by:
I need a strategy to debug this situation... I can't put all the code involved, but here are some of the critical lines with comments: ------------------------- Private _parentDataCell As...
0
by: snowjim | last post by:
Hey! How do I clone a DataGridViewCell? I Have tested the fallowing: MyCostomRow row = r.Clone(); for (Int32 index = 0; index < r.Cells.Count; index++) { row.Cells =...
0
by: Spam Catcher | last post by:
Hi all, I'm trying to set the DataGridViewCell.Value of an unbound column. I can set the value in code, but the value isn't being displayed. I tried to RefreshEdit/EndEdit/Invalidate the...
0
by: Robert Koch | last post by:
Hello! I'm writing a Windows Application and want to host different User Controls in a DataGridView. The Controls are not known during design time, they could be graphs, comboboxes, curves,...
3
by: WISEMANOFNARNIA | last post by:
I would like to prevent a user from exiting a page by clicking on links. the only way he should be able to exit is clicking on a 'save' button or a 'cancel' button. I can see that javascript is...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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,...

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.