Old value of a datagridview combobox cell

B

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
 
B

Bart Mermuys

Hi,

Bob said:
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
 
B

Bob

Bart thanks again you brought up a good point and I've been thinking about
it.

Thanks for your comments.
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top