You are currently viewing the BOOK: Visual Basic 2008 Programmer's Reference ISBN: 978-0-470-18262-8 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
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 01:41 PM.
Reason: [Code] and [/code] tags