datagridview refresh

  • Thread starter Thread starter M K
  • Start date Start date
M

M K

I have added a record to the underlying db and after I add the record i do a
datagridview.Refresh(); and i dont see the newly added record.

If i stop and start the application its there. What am I doing or not
doing?

Mark
 
datagridview.Refresh() redraws the grid-view from the data source
(presumably a DataSet in your case); it doesn't reload the DataSet
from the database. You may have to Clear() and Fill() the DataTable
(or DataSet).

Marc
 
I found the .Clear() method but not the .Fill() method on the dataset.

I have the following:
Dataset
BindingSource
TableAdapter
 
uggg i finally figured it out..

DataSet1.GetChanges();

TableAdapter.Fill(DataSet1.table);



thanks for pointing me in the right direction :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top