Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
  #2 (permalink)  
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.