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

DataGrid's TextBox KeyDown Event

Hi,

In my C# 1.1 windows form application, I have a KeyPress Event for a TextBox
in a DataGrid.
But I have some problem with the value of the KeyPress Event.
Saying the original value in that TextBox is AA, but when I key in another
character B after the 'AA',
the value in the KeyPress's sender is still 'AA', not 'AAB'.
How do I fix this problem?
Thanks for help.

protected void ItemCodeTextBox_KeyPress( object sender, KeyPressEventArgs e)
{
...

}

Jason
Aug 18 '08 #1
0 950

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

Similar topics

2
by: Nick | last post by:
I have a windows application wherein I have focus on a datagrid. Now when i hit the down arrow, I want to capture the event. However, my datagrid.KeyDown event handle is not getting invoked at all....
3
by: bardo | last post by:
I have a Datagrid that is inside a panel. I want to use the keyDown event to reconize the arrow keys. But I have no luck at all. The problem is that the keydown event won't fire at all, unless I...
3
by: Mike L | last post by:
For a Data Grid in a Win Form, when the user selects a row and then presses the Enter key, how do I capture that the user pressed the enter key?
9
by: robert_rowe | last post by:
Does anyone know how to detect keypresses in a Datagrid cell? The Keypress event ofthe datagrid doesn't fire if you are in a cell. Neither does KeyUp & KeyDown. I've tried hooking in to the...
2
by: John Huang | last post by:
I would like to use datagrid's keydown event to capture the "Ctrl+D" when users press this key. But it did not work. What did I miss? (I have already set the form keypreview to true) Private...
6
by: Avi G | last post by:
Hi, what is the code to limit a textbox that will accept only text and not number private void button1_Click(object sender, EventArgs e) { if (textBox1.Text = "numbers") { // do something }
21
by: Darin | last post by:
I have a form w/ a textbox and Cancel button on it. I have a routine to handle textbox.validating, and I have the form setup so the Cancel button is the Cancel button. WHen the user clicks on...
2
by: jd | last post by:
I have several textboxes in which the end user can enter values. When the user presses the Enter key when in any of the textboxes, or leaves that textbox, I want a routine to run (mathematical...
0
by: JamesOo | last post by:
I have the code below, but I need to make it searchable in query table, below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only,...
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...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: 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 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.