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

Dirty value of datagridview cell

How do I the value of a cell in a datagridview, before it is updated?

I wish to validate the "visible" value, not the actual value (cell/row
hasn't been updated yet).
Thanks in advance.

/Snedker
Mar 22 '06 #1
1 7918
Hi,

Use the cell validating event

Private Sub DataGridView1_CellValidating(ByVal sender As Object, ByVal e
As System.Windows.Forms.DataGridViewCellValidatingEve ntArgs) Handles
DataGridView1.CellValidating
Dim strOld As String = DataGridView1.Item(e.ColumnIndex,
e.RowIndex).Value.ToString
Dim strNew As String = e.FormattedValue.ToString

Trace.WriteLine(String.Format("Old Value {0} {1}New Value {2}",
strOld, ControlChars.NewLine, strNew))
End Sub

Ken
--------------------
"Morten Snedker" <morten_spammenot_ATdbconsult.dk> wrote in message
news:di********************************@4ax.com...
How do I the value of a cell in a datagridview, before it is updated?

I wish to validate the "visible" value, not the actual value (cell/row
hasn't been updated yet).
Thanks in advance.

/Snedker

Mar 23 '06 #2

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

Similar topics

2
by: Bob | last post by:
I need to check if there has been a difference between the old value in a call of a datagridview and the new value after the user changed a selection in a combobox in the datagridview. I can find...
0
by: Marc | last post by:
In a datagridview, I have an input cell that I would like to be able to capture the uncommited data (dirty) one input key at a time before the user moves to the next cell. All of the events appear...
10
by: steve | last post by:
Hi All I would like to be able to change the cell borders on certain cells to none at runtime to make a group of cells appear to be merged I have tried the following in the cellformatting...
2
by: news.microsoft.com | last post by:
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. ...
3
by: Henry Jones | last post by:
I am using VB.NET VS 2005 and I have a datagridview bound to a table. This table has rate information on bank loans. The fiels are ProductName, MinDeposit, Rate, and PreviousRate On the grid...
1
by: Dranizz | last post by:
I want to set the value of a cell in a datagridview. DatagridView.CurrentRow.Cells(CEllName).value = "Blabla" When I do this in code and when it's the first cell I edit in a new row, it does...
1
by: PawelR | last post by:
Hi Group, In my application I have DataTable which is displayed in DataGridView via DataView: DataView myView = new DataView(myTable); myDataGridView.DataSource = myView; One column im...
2
by: Claudia Fong | last post by:
Hi I have a datagrid with 12 columns and various rows... what I want to do is to get the value of each cell, e.g. column3 row1, column4 row1, etc.. I was using dataGridView1.Rows.Cells but...
0
by: hydro123 | last post by:
I am using VC++2008 and am trying to read data enetered in unbound datagridview to implement in function. Under button_click event I entered the following: // initialize varaibles from...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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:
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.