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

DataGridView, getting the dirty value of a cell when editing

Hi guys,

I have a problem with the DataGridView. I want to catch the value of a cell
when the user is editing it. Actually, I can't figure if there is an event
or a property to get this value.

For example, when the user type something on a cell, I want to display what
he wrote on another place in my application. I don't care if this text isn't
going to be used finally (a.k.a, if the user cancel the editing mode).

Is there a way to do that? I really can't figure any.

Thanks!
Oct 31 '06 #1
2 4718
Oops, sorry for the silly name i used. Misconfiguration of this newsreader.

"news.microsoft.com" <tynril[no@spam]gmail.comwrote in:
Oz**************@TK2MSFTNGP03.phx.gbl...
Hi guys,

I have a problem with the DataGridView. I want to catch the value of a
cell when the user is editing it. Actually, I can't figure if there is an
event or a property to get this value.

For example, when the user type something on a cell, I want to display
what he wrote on another place in my application. I don't care if this
text isn't going to be used finally (a.k.a, if the user cancel the editing
mode).

Is there a way to do that? I really can't figure any.

Thanks!

Oct 31 '06 #2
On 2006-10-31, news.microsoft.com <tynrilwrote:
Hi guys,

I have a problem with the DataGridView. I want to catch the value of a cell
when the user is editing it. Actually, I can't figure if there is an event
or a property to get this value.

For example, when the user type something on a cell, I want to display what
he wrote on another place in my application. I don't care if this text isn't
going to be used finally (a.k.a, if the user cancel the editing mode).

Is there a way to do that? I really can't figure any.
Uses the DGV EditingControlShowing event to get at the control..
Here is an example for a DataGridViewTextBoxColumn...

private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
TextBox textBox = e.Control as TextBox;
textBox.Text = "hihi";
}

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.be>
Oct 31 '06 #3

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

Similar topics

8
by: George | last post by:
Hi, I have been trying to see if I can do the following: 1. Create a DataGridView 2. Create 2 columns in the DataGridView (1 textbox and the other combobox) 3. Create a DataTable containing...
5
by: bob | last post by:
Now this ought to be a simple matter. But nothing's simple in the Net world, I'm finding. In vb6 you could use "!" to force text to upper case in the format function. I've searched the vb.net...
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...
5
by: DanThMan | last post by:
The situation: * I have a ButtonColumn in a DataGridView. * When the user preses one of the buttons, a dialog appears. * Based on what the user selects in the dialog, data is entered...
0
by: RKT | last post by:
I have a DataGridView bound to an MS Access table. This is a single- user application. When the User is adding or editing a row, the User may click on a Control elsewhere. That Control has context...
1
by: Roach | last post by:
VB.NET 2005 2.0 Framework application is using a DataGridView for SQL data access and user data entry. As part of exception/error handling, the app wants to advise the user when he/she enters a...
0
by: systeko | last post by:
Hello, I have one little problem which make me crazy. I've made application (for Windows) in Visual C#. On one panel I've got datagridview control which is not bind to database, I populate it...
1
by: JB | last post by:
Hi All, I'd like to display password characters in a DataGridView column, the same way I can do in a standard TextBox by using the PasswordChar property (i.e.typed characters replaced by a star...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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...

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.