473,472 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reloading DataGridView

LegalIT
15 New Member
Hello,

I am using VB.net.

I have a DataGridView that is loaded with a transaction history from a database by a call to a subroutine called LoadHistory(). I have three buttons that open new forms, one allows a transaction to be edited, one allows a transaction to be added and one that allows a transaction to be deleted. The transaction changes are being correctly loaded into the database. When I close the forms I would like the DataGridView to be reloaded with the changes. I tried to put a call to LoadHistory() after my database change. I tired putting the call on the Leave event and Form Closed event. I can't seem to get my DataGridView reloaded without stepping to the next record and then back again.

Any suggestions?
Feb 22 '08 #1
3 1765
lotus18
866 Contributor
Hello,

I am using VB.net.

I have a DataGridView that is loaded with a transaction history from a database by a call to a subroutine called LoadHistory(). I have three buttons that open new forms, one allows a transaction to be edited, one allows a transaction to be added and one that allows a transaction to be deleted. The transaction changes are being correctly loaded into the database. When I close the forms I would like the DataGridView to be reloaded with the changes. I tried to put a call to LoadHistory() after my database change. I tired putting the call on the Leave event and Form Closed event. I can't seem to get my DataGridView reloaded without stepping to the next record and then back again.

Any suggestions?
Are you referring Transaction History to an Audit Trail? If yes, I think it is not a better idea that the Transaction History to be edited.
Feb 23 '08 #2
LegalIT
15 New Member
Are you referring Transaction History to an Audit Trail? If yes, I think it is not a better idea that the Transaction History to be edited.

It is just a history log of task assignments. Sometimes the person who was assigned the task is busy so someone else does the task. In this case the manager wants to be able to go in and change the "history".
Feb 25 '08 #3
VBWheaties
145 New Member
Hello,

I am using VB.net.

I have a DataGridView that is loaded with a transaction history from a database by a call to a subroutine called LoadHistory(). I have three buttons that open new forms, one allows a transaction to be edited, one allows a transaction to be added and one that allows a transaction to be deleted. The transaction changes are being correctly loaded into the database. When I close the forms I would like the DataGridView to be reloaded with the changes. I tried to put a call to LoadHistory() after my database change. I tired putting the call on the Leave event and Form Closed event. I can't seem to get my DataGridView reloaded without stepping to the next record and then back again.

Any suggestions?
Are we taking your word for it that LoadHistory() definitely works? Or is that where you are having the issue? I would post here LoadHistory() because, in VB.NET, there are many strategies for updating databases and then retrieving latest results.
Feb 25 '08 #4

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

Similar topics

0
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,...
6
by: dbuchanan | last post by:
Hello, Is this a bug? Is there some kind of work around? I want to add default values for a few columns in my datagridview I found the "DefaultValuesNeeded" event for the datagridview I...
10
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
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
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
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
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
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
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
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
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
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
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
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.