By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,695 Members | 1,638 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,695 IT Pros & Developers. It's quick & easy.

Different Forms

P: n/a
I got a program that consists of different windows forms.
I can add, edit, delete and view data.
After I deleted or edited data, the window gets closed and the updated data
should be shown,
but so far it only shows the window as it was before a edit or a delete,
which is quite confusing.
What have I got to do? Destroy the old window and create a new window?
If so, how can I make it to display the same (now altered) data as before?
thx,

stefan
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi, Stefan

check if you cause update on windows after you process the changes. Ideally
you should use some kind of event, which will say to all subscribing windows
that underlying data was changed, so it's time to refresh the contents.

Take a look how you bind data to windows when you load them. You can use
same code - maybe with some tweaks to increase performance - after you
confirm changes.

HTH
Alex

"Stefan Richter" <sp**@spammenot.com> wrote in message
news:c8***********@otis.netspace.net.au...
I got a program that consists of different windows forms.
I can add, edit, delete and view data.
After I deleted or edited data, the window gets closed and the updated data should be shown,
but so far it only shows the window as it was before a edit or a delete,
which is quite confusing.
What have I got to do? Destroy the old window and create a new window?
If so, how can I make it to display the same (now altered) data as before?
thx,

stefan

Nov 20 '05 #2

P: n/a
How exactly do you handle your data? Is it in a dataset that is bound to your forms controls? Unless you are clear on how the data is stored and show, there is no way to find the problem.

If it is a refresh problem you may try and see if a formname.Refresh helps you.

--
Regards,
Anand M
VB.NET MVP

http://www.dotnetindia.com
"Stefan Richter" wrote:
I got a program that consists of different windows forms.
I can add, edit, delete and view data.
After I deleted or edited data, the window gets closed and the updated data
should be shown,
but so far it only shows the window as it was before a edit or a delete,
which is quite confusing.
What have I got to do? Destroy the old window and create a new window?
If so, how can I make it to display the same (now altered) data as before?
thx,

stefan

Nov 20 '05 #3

P: n/a
The data on the first (view) page gets redisplayed when I press a button -
I mean all display stuff is done in this button handler.
But I don't know if I can / should call this button (handler) in some way.

Stefan
Nov 20 '05 #4

P: n/a
If you are populating the controls on that form in the button click, then one possiblity is problems with refreshing of the form. So you may try calling the refresh method after the form has been loaded.

Another problem that may be happeing is if you are using instances of the form you created and showing a different instance, while populating the data in a different one.

--
Regards,
Anand M
VB.NET MVP

http://www.dotnetindia.com
"Stefan Richter" wrote:
The data on the first (view) page gets redisplayed when I press a button -
I mean all display stuff is done in this button handler.
But I don't know if I can / should call this button (handler) in some way.

Stefan

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.