Reputation: 1215
i have a Problem with DataGridView in c# and i hope you can help me :) I added a DataGridView to my Application and bind it to DataTable. The DataTable changing the content but the DataGridView doesnt display it... How can i change this ? Thanks
Upvotes: 1
Views: 15101
Reputation: 1
// clear your dataset
this.dataSet1.Clear();
// refill you dataset
this.dataSet1.ReadXml("data.xml");
Upvotes: -2
Reputation: 1
You need use
this.TableAdapter1.Fill(this.DataSet1.zakaznici);
That is usable for me. Try it
Upvotes: 0
Reputation: 73564
Is the data changing at the source, or within the application?
If the data is changing at the source, then I think the issue may be that .Net by default supports a disconnected data paradigm which is different from using a permanently connected model. Once the data is retrieved from the server, the client is no longer connected unless you go and get the data again. For example, if you're using a TableAdapter, you'd have to periodically call the DataAdapter.Fill() command to retrieve the data from the server.
If the data is changing in your app based on user interaction, then possibly DataDable.AcceptChanges() followed by Application.DoEvents()?
Upvotes: 4