not be the best one, but hope this would help
VB Code:
private void Form1_Load(object sender, System.EventArgs e)
{
//conn is a connection from sql
//DataAdapter da
//ds is your DataSet
da.SelectCommand=new SqlCommand("select * from student",conn);
ds.Tables.Add(new DataTable("test"));
da.Fill(ds.Tables["test"]);
this.dataGrid1.DataSource=ds.Tables["test"];
}
private void btnsave_click(object sender, System.EventArgs e)
{
if (ds.HasChanges())
{
SqlCommandBuilder cm = new SqlCommandBuilder(da);
da.Update(ds,"test");
}
}
cheers.