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

Old value of a datagridview combobox cell

Bob
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 my new value OK.

Me.datagrid1("MyColumn", e.rowindex).value.tostring

The datagrid view is bound to a table and there is no Oldvalue property in
the intellisense when I type Me.datagrid1("MyColumn", e.rowindex).

How do I find the old value of that cell

Any help would be appreciated.
Bob
Jan 9 '06 #1
2 7059
Hi,

"Bob" <bd*****@sgiims.com> wrote in message
news:eZ**************@TK2MSFTNGP11.phx.gbl...
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 my new value OK.

Me.datagrid1("MyColumn", e.rowindex).value.tostring

The datagrid view is bound to a table and there is no Oldvalue property in
the intellisense when I type Me.datagrid1("MyColumn", e.rowindex).
Depends where you exactly want to get the old value ( CellEndEdit ? ) and
old value can mean two things: either the last saved/ loaded value or the
value before the last edit.... If it's the latter then you could maybe
store the oldvalue at CellBeginEdit.

If you only need to know there is a change then you might use the
CellValueChanged event.

HTH,
Greetings

How do I find the old value of that cell

Any help would be appreciated.
Bob

Jan 9 '06 #2
Bob
Bart thanks again you brought up a good point and I've been thinking about
it.

Thanks for your comments.
Bob
"Bart Mermuys" <bm*************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

"Bob" <bd*****@sgiims.com> wrote in message
news:eZ**************@TK2MSFTNGP11.phx.gbl...
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 my new value OK.

Me.datagrid1("MyColumn", e.rowindex).value.tostring

The datagrid view is bound to a table and there is no Oldvalue property
in the intellisense when I type Me.datagrid1("MyColumn", e.rowindex).


Depends where you exactly want to get the old value ( CellEndEdit ? ) and
old value can mean two things: either the last saved/ loaded value or the
value before the last edit.... If it's the latter then you could maybe
store the oldvalue at CellBeginEdit.

If you only need to know there is a change then you might use the
CellValueChanged event.

HTH,
Greetings

How do I find the old value of that cell

Any help would be appreciated.
Bob


Jan 10 '06 #3

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

Similar topics

4
by: Aaron Smith | last post by:
Ok, this is an odd one, but I could use some assistance with the framework 2 in VB.Net... I want to have a DataGridViewColumn, only have it use the ComboBox, then when they drop down the...
1
by: noob | last post by:
Hi I am having issues with a combobox column in a datagridview with virtual mode enabled. I am binding data to both the datagrid and combobox from an sql database. Everything works fine however...
1
by: Larry Lard | last post by:
I'm trying to find where this behaviour is documented: Create a new WinForms app in VC#2005, drop a DataGridView on the form. Put this code in the ctor after InitializeComponent: ...
1
by: Martin Arvidsson | last post by:
Hi! I have created a ComboBox, with special features. When I use a DataGridView i want to use my ComboBox instead of the built in combobox. How can i do this? Regards Martin
2
by: David Jackson | last post by:
Hello, I have an unbound DataGridView of which one of the columns is a ComboBox colum containing category data, plus an additional option called <newSo when the ComboBox is dropped down it looks...
1
by: Andrus | last post by:
I have Text box controls and DataGridView control in WinForms form. DataGridview contains custom ComboBox columns and standard TextBox columns. Edit mode is EditOnEnter. When focus is moved...
2
by: hvj | last post by:
Hi all, I'm stuck on the following seemingly easy issue? When I know the row nr and column nr of a cell in a datagridview with a combobox in it how do I get a reference to that combobox? ...
1
Plater
by: Plater | last post by:
I feel like this question has been asked before, but I couldn't find it. I think I am missing something obvious. Basically I am going to have a DataGridView with two columns. One textbox, one...
2
by: =?Utf-8?B?RHJEQkY=?= | last post by:
I understand that the Value put into a DataGridViewComboBoxCell has to be a member of the Items list or an exception is thrown. I also understand that you can override that exception by handling...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.