this.dataSet1.newrow();
//编辑DATAGRID内容
try{
this.sqlDataAdapte1.update();
}
catch(Exception ex){
MessageBox.Show(ex.Message);
}
不知道这样算不算。
//编辑DATAGRID内容
try{
this.sqlDataAdapte1.update();
}
catch(Exception ex){
MessageBox.Show(ex.Message);
}
不知道这样算不算。
dataGrid1.DataSource=mydataset.tables[0].DefaultView;其中删除较为简单,
myDataSet2.Tables [0].Rows[selRowIndex].Delete();
dataGrid2.DataSource=myDataSet2.Tables[0].DefaultView;
selRowIndex为选中的当前记录
这样没有删掉数据库中的数据吧?只是删掉DataTable中的数据?
http://csharps.yeah.net
《C#与.NET技术平台实战演练》第22章,包括了你要问的全部内容!