473,320 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Refreshing datagridview

I have some fields with a button that adds records to an Access db.
The fields get values from the fieleds.
In the same window I have a datagrid with a list of the same records from
the access db.
When I click the button on the form I want to add records as described above
and then refresh (requery)
the datagrid so I can see the last record added in the datagrid.
I have tried to put
dgvToDo.Refresh()
Me.TblToDoTableAdapter.Fill(Me.DsToDo.tblToDo)
with bo luck

reidarT
Jul 4 '06 #1
1 1211
Reidar,

I did not try it, but at least would I turn them around, otherwise it makes
not much sense.
The way this code is placed can make the differens is your DsToDo is
renewed, than you need to set the bindings as well.
Me.TblToDoTableAdapter.Fill(Me.DsToDo.tblToDo)
dgvToDo.Refresh()
Cor

"reidarT" <re****@eivon.noschreef in bericht
news:ed**************@TK2MSFTNGP03.phx.gbl...
>I have some fields with a button that adds records to an Access db.
The fields get values from the fieleds.
In the same window I have a datagrid with a list of the same records from
the access db.
When I click the button on the form I want to add records as described
above and then refresh (requery)
the datagrid so I can see the last record added in the datagrid.
I have tried to put
dgvToDo.Refresh()
Me.TblToDoTableAdapter.Fill(Me.DsToDo.tblToDo)
with bo luck

reidarT

Jul 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RSH | last post by:
I have a situation where I have a Master form that contains a DataGridView. Each row has a details... button that spawns a new winform which shows many more fields than the DataGridView. The user...
0
by: Bob | last post by:
I have relational integrity set up in my sql server 2005 database that prevents cascading deletes in some cases. I'm using a bound datagrid view and a tablenavigator. When I click the delete...
1
by: Steve | last post by:
I have a bound DataGridView. When I add an item to the DataSource, the DataGridView won't reflect the new row. I have googled and googled, no solution that I have found online works. One thing...
1
by: Greg | last post by:
I'm using a DataGridView object bound to an xml datasource. I have added 2 unbound columns which are populated based on the calculations of data from other columns. When the data in the other...
3
by: steve | last post by:
Hi All How can I get the datagridview to redraw after changing the rowtemplate.height at runtime ( it is databound to a datatable) I have tried datagridview1.refresh etc to no avail (The row...
0
by: lv2compute | last post by:
I am having a problem with my datagridview. I have a small table that has two columns. The first column is bound to my dataset. The second column is a combobox. I add items to the combobox based on...
1
by: romerve | last post by:
Hello; i am having some problems trying to get a form that has a datagridview to refresh after a new record is created. I have a MDI container and menu form and add new record form; the menu...
1
by: Arved Sandstrom | last post by:
This seems to be something so simple that none of the hundred-odd tutorials and forum threads that I have looked at (:-)) apparently thinks it's a problem. In a nutshell, I have two...
0
by: enrico via DotNetMonster.com | last post by:
as a way of refreshing my datagridview i rerun my query after every command. on my delete button i use the same procedure but as a result it will clear all the results. can anyone help me how to...
1
by: Andrus | last post by:
I have Winforms DataGridView whose DataSource Rids is Marc sample TableListCollection<TRowderived from BindingList. It is used to edit invoice rows. If user presses Revert button, my application...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.