Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have filled the datagridView using the code below

    this.empinfoTableAdapter1.Fill(this.empData.empinfo);

but when i am updating the table from gridview its updating the orginal database. But not showing the update in the form.

I have searched google and found similar question. But most of them are custom data binding. Not using

  this.empinfoTableAdapter1.Fill(this.empData.empinfo);

so, i posted the question.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
254 views
Welcome To Ask or Share your Answers For Others

1 Answer

If it is ASP.Net application then you need to call DataBind() like:

GridView1.DataBind();

If its WinForm application then you need to assign the DataSoure again like:

GridView1.DataSource = this.empData.empinfo;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...