Hi,

I'm looking to find out how to force a refresh on a datagrid in a windows app. On a mainForm the user clicks a button to add a new record. This opens a new window. When the user has entered the data they click save and close which should commit the data and close the new window.

I also need to refresh the original datagrid so the new information is present. Ive tried invalidate(), and also endEdit() with refresh() on the datagrid but nothing seems to be working.

Can anyone shed any light?

Cheers.

dataGridView1.DataSource = typeof(List); 
dataGridView1.DataSource = ds; //datasource object var.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.