|
-
Apr 22nd, 2008, 01:48 PM
#1
Thread Starter
Member
[RESOLVED] Index out of range exception
Hi Techies
I recently added code to a form event called Shown to make certain cells of each row of my datagridview read-only. Then I set the focus of the datagridview to the last entry of the dgv with the following code.
dgvCashJournal.Focus()
dgvCashJournal.CurrentCell = dgvCashJournal(0,
dgvCashJournal.RowCount - 1)
The problem I am having is I get an index out of range exception when I attempt to do anything after the dgv is displayed. I cannot exit the routine or refresh the data. The person who gave me the original code is no longer available. I know I need to put some code in place to handle this exception but don't know where or how. Can anyone help?
Papiens
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|