Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Navigating a DataGridView bound to a Dataset

Posted on 2006-07-06
5
Medium Priority
?
490 Views
Last Modified: 2012-06-27
Hi,

I am writing a program to take an attendance register and have a datagridview control which is bound to a dataset:

DataGridView1.DataSource = ds.Tables("attendance_marks")

When i click a button e.g. "Present", i have set the action to change the value of a field to "present", but then i want it to automatically move to the next record. It would make it much quicker for users however i can't figure out how to do this.

With VB6 it was just the case of calling the .MoveNext function but that does not exist now as far as i can see.

Thanks
Adam
0
Comment
Question by:adamday
  • 2
5 Comments
 
LVL 2

Expert Comment

by:Bill_PSC
ID: 17050912
Try this:

 Me.BindingContext(dataset, "datatable").Position += 1
0
 

Author Comment

by:adamday
ID: 17050979
Hi,

Ive tried that and it doesn't work. The datagridview just stays in the same line and if i click the button again, it just changes the same entry.

Adam
0
 

Author Comment

by:adamday
ID: 17051553
Hi,

Ive solved the problem.

Dim cm As CurrencyManager
cm = BindingContext(DataGridView1.DataSource, DataGridView1.DataMember)
cm.Position += 1

Adam
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 17105611
Closed, 250 points refunded.
Netminder
Site Admin
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

916 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