I have worked in ASP.net before and know that I can edit its equivalent to a datagrid (detail view or something like that?) However, I'm working on a windows form now and i need to use the datagrid. I know there are options to edit each individual cell and when I ran my program, it edited it, but it does not update to the datab开发者_开发百科ase. I was wondering how I would be able to write a SQL code using ADO.net for the datagrid so I can update certain things (or I can bind the datagrid but maybe there is a build in edit command) thanks!
Databinding is significantly different in WinForms than it is in ASP.NET. There's no request cycle and databinding is always both ways (controls read data from the datasource and automatically update it as well).
However you'll still need to take the data from your datasource and persist it to the database. How you do that depends on what your datagrid is bound to.
I recommend you review this MSDN article Windows Forms Data Binding and the links that matter to you
精彩评论