Datagrids 
Author Message
 Datagrids

Hi all

I am working on an app that works with a simple access db.
In my app I have a datagrid that simply displays one of my
db tables. Problem is, when I insert new info to the table
and open my window that holds the datagrid, nothing
happens right away. I set the datagrid to refresh
(datagrid1.refresh) but for some reason I have to open the
window, then close it, just to reopen it in order to see
the refresh. I don't get it.

Any help would be appreciated.
thanks



Fri, 15 Oct 2004 21:16:04 GMT  
 Datagrids
The Jet engine has a certain degree of latency due to the fact that it's a
file-based database. This latency is known as the PageTimeout; this value
is 5 seconds by default. As a result, you cannot rely on anything you've
just inserted into the database actually being there for other bound
controls for up to 5 seconds.

You may wish to add the row through the datagrid so that it's both written
to the database and appears in the grid. For instance, load your form but
don't show it, and write directly to the recordset to which the grid is
bound to add the row.

Hope this helps.

Steven Bras, MCSD
Microsoft Developer Support/Visual Basic WebData

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.



Sun, 17 Oct 2004 06:44:11 GMT  
 Datagrids
Try Rebind instead of Refresh. Refresh is for grafic purposes not for
database sync.

Andy,



Quote:
> Hi all

> I am working on an app that works with a simple access db.
> In my app I have a datagrid that simply displays one of my
> db tables. Problem is, when I insert new info to the table
> and open my window that holds the datagrid, nothing
> happens right away. I set the datagrid to refresh
> (datagrid1.refresh) but for some reason I have to open the
> window, then close it, just to reopen it in order to see
> the refresh. I don't get it.

> Any help would be appreciated.
> thanks



Sun, 17 Oct 2004 23:35:48 GMT  
 Datagrids
Thanks guys

Good info. I had to force it though. rebind didn't help.
To refresh I ended up manually counting all the records in
the grid, then deleting them all and re populating it from
the db. Ugly but not hard.

Thanks for letting me know why it wouldn't work though.

Quote:
>-----Original Message-----
>Hi all

>I am working on an app that works with a simple access
db.
>In my app I have a datagrid that simply displays one of
my
>db tables. Problem is, when I insert new info to the
table
>and open my window that holds the datagrid, nothing
>happens right away. I set the datagrid to refresh
>(datagrid1.refresh) but for some reason I have to open
the
>window, then close it, just to reopen it in order to see
>the refresh. I don't get it.

>Any help would be appreciated.
>thanks
>.



Sun, 24 Oct 2004 22:02:51 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Need some help with DataGrids (DataGrid-->DataGrid, DataGrid-->Dataset, DataGrid-->XML)

2. How do I set the Datagrid row to be same size as the datagrid window

3. Using datagrid as datasource for another datagrid

4. Datagrids inside a Datagrid

5. Copy from Datagrid to datagrid

6. Updating datagrid with requery, datagrid goes to top

7. DataGrid and "Microsoft Datagrid: The Current Row is not available"

8. HELP needed: missing one record when displaying in DataGrid

9. help on datagrid

10. datagrid in vba

11. Using ADO with DataGrid

12. Having different recordsource in Datagrid : Is it Posibble?

 

 
Powered by phpBB® Forum Software