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

Home Posts Topics Members FAQ

Refeshing a DataGridView

I am working in vs2008 Win C#.

I have a windows form with a DataGridView. I go to a detail form to
edit/delete the data. When I come back the changes are not reflected. How
do I refresh the data to show edits and deletes?

Any help is greatly appreciated.
Jun 27 '08 #1
4 888

"Greg Smith" <gj*@umn.eduwrote in message
news:uV**************@TK2MSFTNGP02.phx.gbl...
>I am working in vs2008 Win C#.

I have a windows form with a DataGridView. I go to a detail form to
edit/delete the data. When I come back the changes are not reflected.
How do I refresh the data to show edits and deletes?
The data came from somewhere. And you're going to need to clear the grid
and re-populate your data from your data source that has reflected changes
to the data.

Jun 27 '08 #2
On Mon, 5 May 2008 08:51:02 -0500, "Greg Smith" <gj*@umn.eduwrote:
>I am working in vs2008 Win C#.

I have a windows form with a DataGridView. I go to a detail form to
edit/delete the data. When I come back the changes are not reflected. How
do I refresh the data to show edits and deletes?

Any help is greatly appreciated.
Is the DataGridView bound to something? If so, what kind of object.

On the detail form, are you modifying the data in the object to which
the DataGridView is bound?
Jun 27 '08 #3
Mr. Arnold wrote:
>
"Greg Smith" <gj*@umn.eduwrote in message
news:uV**************@TK2MSFTNGP02.phx.gbl...
>I am working in vs2008 Win C#.

I have a windows form with a DataGridView. I go to a detail form to
edit/delete the data. When I come back the changes are not reflected.
How do I refresh the data to show edits and deletes?
>And you're going to need to clear the
grid and re-populate your data from your data source that has reflected
changes to the data.
I am new to this.

Could you please give me an example?

ds.Clear();
ds.<something>

Jun 27 '08 #4
Greg,

In my idea it is better as your give yourself a little sample of your code.

This newsgroup is not to make code for you but to help you with your code.

Cor

"Greg Smith" <gj*@umn.eduschreef in bericht
news:OI**************@TK2MSFTNGP04.phx.gbl...
Mr. Arnold wrote:
>>
"Greg Smith" <gj*@umn.eduwrote in message
news:uV**************@TK2MSFTNGP02.phx.gbl...
>>I am working in vs2008 Win C#.

I have a windows form with a DataGridView. I go to a detail form to
edit/delete the data. When I come back the changes are not reflected.
How do I refresh the data to show edits and deletes?
And you're going to need to clear the
grid and re-populate your data from your data source that has reflected
changes to the data.

I am new to this.

Could you please give me an example?

ds.Clear();
ds.<something>
Jun 27 '08 #5

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

Similar topics

0
3559
by: DraguVaso | last post by:
Hi, I'm using the DataGridView in VB.NET 2.0. The DataSource is a Generic List of a custom class0: lstMyPersonnes = New List(Of clsPersonne). When I add a new clsPersonne to lstMyPersonnes,...
10
39447
by: Henok Girma | last post by:
Hello Gurus, I want to save the state of an unbound DataGridView on my Windows Form application to an XML file so i can later load it back.. Basically, on my form I have a DataGridView, it's got...
3
32242
by: Rich | last post by:
Hello, I am populating a datagridview from a datatable and filtering the number of rows with a dataview object. Is there a way to retrieve the rows displayed by the datagridview into a separate...
2
24510
by: bob | last post by:
Can anyone tell me the best way to update a dataset while it is being edited/viewed in the DataGridView control? Is this something that should be inserted into one of the grid's events? or should...
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...
7
15611
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
0
2481
by: jeastman - Hotmail | last post by:
Hello world Excuse, not to be written English and it helps me with a translator. I am new programming in C#. I made a control inheriting the DataGridView to be able to add controls done by...
3
5703
by: Andrus | last post by:
I have DataGridView in virtual mode containing 3500 rows. In code below, assigning to RowCount value to 3500 takes 8 seconds. CPU usage goes high at this time. Stepping by F11 into user code shows...
0
5635
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
0
7199
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
7074
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
7273
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,...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6982
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
7451
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...
0
5572
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.