private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
con.Open();
da.Update(ds, "s");
bs = new BindingSource(ds, "s");
dataGridView1.DataSource = bs;
con.Close();
ds.Reset();
ds.Clear();
{
تا اینجا مطمائنم که تغییر در ds اعمال میشه حالا می خوام ثبت کنم که دفعه بعدی اطلاعات جدید بیاد که نمی شه، اینم کدشه.
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
con.Open();
da.Update(ds, "s");
ds.AcceptChanges();
con.Close();
ds.Clear();
strsql = "select * from st order by id";
da = new OleDbDataAdapter(strsql, con);
da.Fill(ds, "s");
bs = new BindingSource(ds, "s");
dataGridView1.DataSource = bs;
}