I have a C# DataGridView
. When the user makes changes on the cell, and clicks a button, who do I make those changes in the database?
DataTable dt = new DataTable();
SqlDataAdapter adapter = new SqlDataAdapter();
SqlCommandBuilder scb = new SqlCommandBuilder(adapter);
adapter.Update(dt);
You could simply look-up changes and iterate over them while you execute your own queries. Save datagridView into sql database
You could also fire your action on RowLeave event.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.