473,322 Members | 1,566 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,322 software developers and data experts.

Binding Navigator Refresh Items

The idea being that when a new asset is displayed, the program would
recalculate the values of some labels.
For example, when Previous or Next is clicked.
I set bLoaded=True when the form loads, as otherwise the code would once for
each asset in the database when the form was loading -
Me.AssetsTableAdapter.FillByAsset(Me.AssetsDataSet .Assets, stAssetCode)

Another problem is that when the Save is done, the RefreshItems runs twice
for each of these lines
Me.AssetsBindingSource.EndEdit()
Me.AssetsTableAdapter.Update(Me.AssetsDataSet.Asse ts)

And heres my code:

Private Sub AssetsBindingNavigator_RefreshItems(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AssetsBindingNavigator.RefreshItems

If bLoaded Then
TidyNumbers()
bNewSchedule = False
DoCalcFields()
End If

End Sub

Should I be putting this code somewhere else? How often does
BindingNavigator_RefreshItems run?

Thanks
Vayse

Dec 7 '05 #1
2 3724
Hi,

"Vayse" <va***@nospam.nospam> wrote in message
news:uO***************@tk2msftngp13.phx.gbl...
The idea being that when a new asset is displayed, the program would
recalculate the values of some labels.
For example, when Previous or Next is clicked.
I set bLoaded=True when the form loads, as otherwise the code would once
for each asset in the database when the form was loading -
Me.AssetsTableAdapter.FillByAsset(Me.AssetsDataSet .Assets, stAssetCode)

Another problem is that when the Save is done, the RefreshItems runs twice
for each of these lines
Me.AssetsBindingSource.EndEdit()
Me.AssetsTableAdapter.Update(Me.AssetsDataSet.Asse ts)

And heres my code:

Private Sub AssetsBindingNavigator_RefreshItems(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AssetsBindingNavigator.RefreshItems

If bLoaded Then
TidyNumbers()
bNewSchedule = False
DoCalcFields()
End If

End Sub

Should I be putting this code somewhere else? How often does
BindingNavigator_RefreshItems run?
Can't you use AssetsBindingSource.PositionChanged event instead or does this
cause problems too ?

HTH,
Greetings

Thanks
Vayse

Dec 7 '05 #2
"Bart Mermuys" <bm*************@hotmail.com> wrote in message
news:eT***************@TK2MSFTNGP09.phx.gbl...

Can't you use AssetsBindingSource.PositionChanged event instead or does
this cause problems too ?

That makes it work much better, thank you.
Dec 8 '05 #3

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

Similar topics

0
by: Mike | last post by:
I wasn't real sure which was the best group for this post - please feel free to redirect to the appropriate group(s). My form uses a binding navigator to move through my data source (imagine...
1
by: ankz | last post by:
Hi Guys I have got 3 tables - in Access Database with Student ID as primary Key in all and all tables are linked with 1 to 1 relationship. I have code the everying with manual program to...
1
by: =?Utf-8?B?Sm9iIExvdA==?= | last post by:
how can i add a check box to binding navigator control? thanks
0
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
I am dragging a data souce (access.mdb) to a form. C# automaticallt creates the table adapter, binding adapter, etc. But for some reason, it is not automatically creating the binding navigator. Any...
3
by: Rick | last post by:
VS 2005 The short version: How can I set the enabled state of a button depending on if a strongly-typed datatable has a DeleteCommand? *************************** The long version:
2
by: Randy | last post by:
Hi, I'd like to add a new blank record to a form for the user to input data. What I am trying to do is exactly what the + on the binding navigator does, with some additional steps involved. So,...
2
by: Randy | last post by:
Hi, I'm trying to figure out some binding navigator code. If I have the primary field value as selected by the user in a combo box, how can I instruct the binding navigator to move to that...
1
by: qazplm114477 | last post by:
hello, I have notice that when i drag a table/column from my dataset onto my form, VS2008 automatically populates the form with a binding navigator and some other stuff like the tableadapters and...
1
by: dorkboy | last post by:
Hi all, I am a newbie using VB.net in VS 2008. I took over a vb.net winform application that has a binding navigator in it. The users wanted to add 2 new fields to the form. I added the new...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.