Solved

Move pointer in BindingNavigator with a combobox

Posted on 2010-09-03
1
857 Views
Last Modified: 2012-05-10
Hi Experts,

In my VB2008 I have a form that uses a BindingNavigator and a BindingSource (both on the form) to navigate through a database table (with client information). All buttons on the bindingnavigator work as expected. The fields of the database table are shown in text boxes.
Because there are about 500 rows in the table, I also added a combobox that shows a combination of the last and first names of the clients (= DisplayMember). The ValueMember of the combobox is set at the Primary Key Field of the table.

What I want is this:
- When I select another client name in the combobox, the pointer in the BindingNavigator should move to the corresponding row so that the text boxes are updated.
In my case the Primary Key Field is an integer field named Vrt_ID
When I select another name in my combobox, the valuemember of the combobox is updated to the Vrt_ID of the selected client.
Now I want the BindingNavigator to jump to the field with the same value for Vrt_ID.

How should I do this???
Thanks in advance.
0
Comment
Question by:NoraWil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

by:
John (Yiannis) Toutountzoglou earned 500 total points
ID: 33595978
use the this in combobox selected index change event
Me.Bindingsource.Position=Me.Combobox.SelectedIndex
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question