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

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

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -