Hi.
I am showing my db on datagridview. When I click a button, there are insert and update sql querys working. Of course db is changing but datagridview is not updating. How can I update simultaneously when I click the button?
private void btn_Click(object sender, EventArgs e)
{
OleDbConnection bag = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb;");
string sms_metni = webBrowser1.Document.GetElementById("textbox").GetAttribute("value");
string query_sms = "INSERT INTO sms (sms_metni,toplam_kisi) VALUES ('+sms_metni+','" + dataGridView3.RowCount.ToString() + "')";
OleDbCommand cmd = new OleDbCommand(query_sms,bag_sms);
bag_sms.Open();
cmd.ExecuteNonQuery();
bag_sms.Close();
----> How can I update datagridview in here?
}