Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Navigating a DataGridView bound to a Dataset

Posted on 2006-07-06
5
Medium Priority
?
486 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
[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
  • 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's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

715 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