Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Visual Basic 2008 Programmer's Reference ISBN: 978-0-470-18262-8
This is the forum to discuss the Wrox book Visual Basic 2008 Programmer's Reference by Rod Stephens; ISBN: 9780470182628
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2008 Programmer's Reference ISBN: 978-0-470-18262-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 26th, 2009, 11:26 AM
Registered User
Points: 21, Level: 1
Points: 21, Level: 1 Points: 21, Level: 1 Points: 21, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2009
Location: Simi Valley, CA USA
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagridview Set Focus Next Control

I can't figure out where to put the code to advance to the next datagridview control when a specific condition occurs. Here's the code to set the focus.
Code:
Friend Sub Advance2Next(ByVal dgv As DataGridView)
Dim gc AsInteger = dgv.CurrentCell.ColumnIndex
Dim gr AsInteger = dgv.CurrentCell.RowIndex
dgv.CurrentCell = dgv.Item(gc + 1, gr)
EndSub
This code keeps giving me this error: Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.

I'm calling this Sub from within the CellEnter event.

Last edited by ebassador; June 26th, 2009 at 12:41 PM.. Reason: [Code] and [/code] tags
 
Old June 27th, 2009, 02:13 PM
Registered User
Points: 21, Level: 1
Points: 21, Level: 1 Points: 21, Level: 1 Points: 21, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2009
Location: Simi Valley, CA USA
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Updated code section




Similar Threads
Thread Thread Starter Forum Replies Last Post
Set focus on web control vivekshah ASP.NET 1.0 and 1.1 Professional 1 June 18th, 2006 11:55 PM
set Focus to web control in Web form vivekshah C# 1 June 17th, 2006 03:25 AM
Set Focus to Field in User Control Ron Howerton ASP.NET 1.0 and 1.1 Professional 3 March 14th, 2006 05:53 PM
set focus akibaMaila VB.NET 2002/2003 Basics 1 July 12th, 2005 05:56 PM
how to set focus waley .NET Web Services 1 May 25th, 2004 02:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.