Update datasource from view values (WinForms DataGridView) -


i changing datagridview cell values programmatically, values not pushed bound datasource. pushed cells belonging selected row. how can ask datagridview push rows values datasource?

edit:

this code seems trick, may better solution?

grid.currentcell = cell; cell.value = "some value"; grid.endedit(0); 

you shouldn't update datagridview cells, instead should directly update data source. if implements inotifypropertychanged, datagridview reflect changes automatically


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -