943,102 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 1028
  • VB.NET RSS
Feb 20th, 2010
0

binding menuitems?

Expand Post »
Hello. I've programmed in VB for ages, but just started dealing with databases and VB.net. The problem I am having is related to a menustrip item. I used the data source wizard to add a database to my application, and did the drag-and-drop thing to put the details on my form. It worked great! I have the binding navigator at the top, and the labeled textboxes on my form. When I click on the button controls on the binding navigator for First, Previous, Next and Last record, it works great, pulling in the data and filing the textboxes.

My problem is, trying to do this with a menu. I want to have the same capabilities from the menu as I have on the binding navigator. I have been looking for how to do this and keep coming up blank. I have tried (among other things) the following:

VB.NET Syntax (Toggle Plain Text)
  1. Private Sub LastRecordToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
  2. ' move to the last record in the table
  3. ' Me.TblAssetsBindingSource.MoveLast()
  4.  
  5. ' the above did not work..........
  6. ' so I tried to fire off the event for when the button on the
  7. ' binding navigator was clicked.... didn't work
  8. ' Me.TblAssetsBindingNavigator.MoveLastItem.PerformClick()
  9.  
  10. ' the above didn't work... so I tried a different way
  11. Me.BindingNavigatorMoveLastItem.Checked = True
  12. ' the above did not work..........
  13.  
  14. End Sub

I must be missing some step somewhere, but I can't find it. I have looked for a way to bind data to the menustip control, but couldn't find one.

What am I missing??

Any help or suggestions would be greatly appreciated.

Thanks in advance,
Garry
Last edited by adatapost; Feb 21st, 2010 at 2:28 am. Reason: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
BigGar is offline Offline
3 posts
since Feb 2010
Feb 21st, 2010
0
Re: binding menuitems?
>What am I missing?

Please post complete code. Wrap programming code within posts in [code] (code blocks).
Moderator
Reputation Points: 2134
Solved Threads: 1227
Posting Genius
adatapost is offline Offline
6,524 posts
since Oct 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: How to create a custom 2 dimensional array datastructure/class
Next Thread in VB.NET Forum Timeline: Upgrading Current Code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC