Home All Groups Group Topic Archive Search About

How to force DataGridView to requery?

Author
2 Apr 2006 11:04 PM
Max
How do you for the datagridview control to requery the database??

Thanks,
--max

Author
2 Apr 2006 11:47 PM
Ken Tucker [MVP]
Hi,

        The datagridview control only displays the data.  You need to have a
datasource requery the database.

Ken
---------
Show quoteHide quote
"Max" <M**@discussions.microsoft.com> wrote in message
news:BF15E970-9527-4A03-A327-CAA1EE809F93@microsoft.com...
> How do you for the datagridview control to requery the database??
>
> Thanks,
> --max
Author
3 Apr 2006 6:01 AM
Simmo
Using a dataset and dataadapter:

dsMyDataSet.clear()
daMyDataAdapter.Fill(dsMyDataSet.MyTable)

That will update the datagrid's displayed data from the latest data in the
table.  That will work for any databound object.


Troy


Show quoteHide quote
"Max" <M**@discussions.microsoft.com> wrote in message
news:BF15E970-9527-4A03-A327-CAA1EE809F93@microsoft.com...
> How do you for the datagridview control to requery the database??
>
> Thanks,
> --max