Rowindex With Just 1 Row?

Jul 13, 2010

I have code some code that works great for the original purpose of grabbing a 24 hour snapshot and importing it into a database eople on this forum board.management wants to grab the data Hourly. There will be only 1 row inserted into the Database at a time, I believe that is what is causing my error, becuase there is only 1 row instead of multiple.I keep on getting a "Index was outside the bounds of the array. error at this line.

h = s(index - 2) & s(index - 1)
Here is the code that I'm using:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

[code].....

View 17 Replies


ADVERTISEMENT

Rowindex On A Row Just Inserted

Sep 1, 2011

I've got a vb project I am updating and it has a datagridview, a panel, and buttons along the bottom. The buttons control CRUD operations. The panel shows numerical up/downs and textboxes to represent the selected row. I use some logic to keep track of current selected row and current row index for timer updates in the background. Upon delete I reset focus on the first row. Upon loading I set focus on first row. On update I keep current row focus.

Upon a good insert I would like to set the focus to the row I just inserted. But I do not know a way to determine what the rowindex value is for this freshly inserted row. My datatable which the datagridview uses is sorted on two id columns so it's not like the new entry will just jump to the bottom. Any ideas on how I can implement this?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved