I have a dataGridView when I click on any row a form is opened to update the row data, but after ending updates the updating form is closed but the dataGridView data is not updated
How can i do that ?
Within the Command Line window, type gpupdate /force and then press Enter on your keyboard. The line "Updating Policy..." should appear in the Command Line window below where you just typed. When the update has finished, you should be presented with a prompt to either logoff or restart your computer.
The latest update of C is called C18 and the standard was published in June 2018. It is almost identical to C11, published in 2011. Before that was C99. Although C11 has some significant changes from C99 they are all C and not that different.
BindingSource
is the only way without going for a 3rd party ORM, it may seem long winded at first but the benefits of one update method on the BindingSource
are so helpful.
If your source is say for example a list of user strings
List<string> users = GetUsers(); BindingSource source = new BindingSource(); source.DataSource = users; dataGridView1.DataSource = source;
then when your done editing just update your data object whether that be a DataTable
or List of user strings like here and ResetBindings
on the BindingSource
;
users = GetUsers(); //Update your data object source.ResetBindings(false);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With