TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yokzu
NA
306
0
Updating datagridview?
Sep 27 2009 10:26 AM
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?
}
Reply
Answers (
8
)
Call another C# Program & pass parameters to bypass startup form
How to initialize DateTimePicker to null