Datagridview updating database
Very simple data manipulation : D I'd suggest you check it out if you're intersted/have spare time.
If there's a way to do this, I'd appreciate the explanation of how, or if there's a way to hide the first line number column the pulls the integer value for the primary key, and have it automatically increment and/or adjust this value according to editing, changes and new rows being added that'd be great.Finally, I tried to use Data Set instead of Data Table, cuz I found some other forums and links to people having the same issue and coded it nearly identical to me, and other people said using Data Set would work - it didn't.Well, thanks to more Googling and combing through other questions here on this site, I found someone answered a similar question that made me realize I was in fact missing something simple.Furthermore, what I don't understand, is that I saw the code done the way I did it work, and it updated the SQL database in the person's youtube tutorial. Sorry, to ask for more detail, but where and how would I set the values for "updated Value and id Of Row To Update?Do I need to tell it to just go throw incrementally and pull the value in each row and send it to update the table, or is there a way to verify if the value has changed from what was originally loaded, and then update only the index of the information on that row?You'll need to form the UPDATE command for your table. You should be able to drop in this new code to the Up Button_Click method and have it work: Could you possibly revise your answer to include how that would be done specifically?
the "Using" brackets help properly dispose of your connection object. I probably should've made it clear I'm fairly new to both C# and SQL.
The Data Grid View can display data in Bound mode, unbound mode and Virtual mode .
Bound mode is suitable for managing data using automatic interaction with the data store.
It should have a Select Command, Update Command, Delete Command, and Insert Command - see msdn.microsoft.com/en-us/library/yz1a0y8It won't know how to perform these operations in the database unless you give it a sql query or stored procedure to run.
Alternatively, you could handle the events in your code-behind and call these things manually.
Unfortunately, you do need to specifically run an update command.