1
votes

I have a DatagridView that are populated manually (no Bind). Have 3 columns: Value 1 Value 2 And Value 3

The user can edit value 1 and value 2 columns. After the user edit the value 1 or value 2 i need to do something:

if((Value 1 + Value 2) > Value 3) The row color change to red

else the row color change to green

Question:

What event should i use to capture the user input? I tried CellValueChanged, CellValidatin and CellEndEdit, but some events are triggered when the grid its populated, and other are triggered if the user do a simple click on the grid... I need to do something only when the user end edit a cell (value 1 or value 2) manually

Thanks a lot

enter image description here

Why won’t the grids CellEndEdit event work for you? It will fire when the user tries to leave a cell that was in edit mode.JohnG