473,503 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatic DataGridView "refresh"?

29 New Member
Hi
In Form1 I have a Datagridview showing the content of a table from DataBase.

In Form2 I add or modify a row in that table. So, when I get back to Form1 I would want the DataGridView get updated automatically.

To populate the DGV I use a Linq To Sql query:
Expand|Select|Wrap|Line Numbers
  1. Dim Query = From .....
  2. Me.DGV.DataSource = Query
  3.  
or

Expand|Select|Wrap|Line Numbers
  1. Dim Query = From .....
  2. Me.BindingSource1.DataSource = Query
  3. Me.DGV.DataSource = Me.BindingSource1 
  4.  
I have been trying to use:
BindSource (as DataGridView.DataSource)
BindingSource.ResetBinding(False)
DGV.Refresh()
etc...

Also, I added a new row in the same Fomr1 and nothing happens.

Thanks for advance !!!
Feb 16 '14 #1
0 1036

Sign in to post your reply or Sign up for a free account.

Similar topics

10
26938
by: rob | last post by:
I have a class that among others exposes a string property "Date". The date in this property is stored in the form yyyymmdd. Now I do the following 1) Generate a DataGridViewTextBoxColumn column...
1
2355
by: Bob | last post by:
During a form's development I noticed that when I changed bound dataset defintions with the dataset designer (for instance adding a column to one), when I come back and look at the form the...
4
8607
by: Matt | last post by:
I have been searching all over the web for a way to sort a DataGridView based on the actual text being shown in a ComboBox column as opposed to the underlying value (an ID in this case). Can anyone...
1
2058
by: martin1 | last post by:
All, I knew .NEt 2.0 DataGridView column sort is automatic, I don't want sort column, is anybody knew how to not sort column in DataGridView? Thanks
3
12838
by: martin1 | last post by:
All, ..Net 2.0 DataGridView column sort is automatic, I don't want column sort, is anybody know how to not sort column in DataGridView? Thanks
7
12551
by: Mitchell S. Honnert | last post by:
Is there an equivalent of the DataGrid's DataGridTableStyle for the DataGridView? If not, is there an easy way to duplicate the DataGridTableStyle's functionality for the DataGridView? Here's...
3
12601
by: mac | last post by:
I have a datagridview that I populate with the result of a web service. The webservice sends multiple rows back with each row as one element of an array. I use a for loop and the...
12
13567
by: cj | last post by:
When viewing a datatable in a datagridview one of the columns in it is a "note" field which can be quite long. I would like to have the note field of the currently selected row of the datagrid...
1
6418
by: Paul Schwann | last post by:
Hi Group, I am using C# with .NET 2.0 and Visual Studio 2005. I have a GUI with a DataGridView (DGV) and a BindingSource for the data. The data are added programmatically, up to 5 rows per...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.