i'm new to c# express edition. I just made a database (microsoft sql one) and made a form where i have placed a datagrid. Now i can see the table that i want in my datagrid. But if i made a change in this datagrid (add a row, delete a row,edit a row) the changes are only stored while running the application but not in my database. How can i do this

Re: Visual C# Express Edition datagrid changes also do in the database

Figo Fei - MSFT


You'd use SqlDataAdpter to update the database, datagrid is just a control to display the data.

And more about dataAdapter to update data: url=/library/en-us/cpguide/html/cpconupdatingdatabasewithdataadapterdataset.asp

About datagird:

The DataGridView control is a new control that replaces the DataGrid control. The DataGridView control provides numerous basic and advanced features that are missing in the DataGrid control. Additionally, the architecture of the DataGridView control makes it much easier to extend and customize than the DataGrid control.

The DataGrid control is retained for backward compatibility and for special needs. For nearly all purposes, you should use the DataGridView control. The only feature that is available in the DataGrid control that is not available in the DataGridView control is the hierarchical display of information from two related tables in a single control. You must use two DataGridView controls to display information from two tables that are in a master/detail relationship.