Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

DatagridView cell edit problem

$
0
0

Hi folks,

I have a datagridView that is linked to a binding source.

When I am inside a cell, I want to be able to click on a "Update" button that will write the changes back to the datasource. The problem is that the value in the current cell does not get saved back to the datasource. The program works fine if I move to another row and then click the update button. 

I tried using the cell_leave event but it does NOT fire when I click on the update button. Same with grid_leave. Have also added grid.EndEdit() as the first line of code inside my update event but that does not save the current cells value either.

Can anyone advise on how I can save the "current" value of the cell ? I would rather not go down the road of programatically moving to another row then back again. 

Thanks,

John


jppnn


Viewing all articles
Browse latest Browse all 2535

Latest Images

Trending Articles



Latest Images