Solved

Move pointer in BindingNavigator with a combobox

Posted on 2010-09-03
1
845 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now