I keep getting the error message:
"Index was out of range. Must be non-negative and less that the size of the collection".
What's weird is...I do the exact same thing with several other DGV's and no problems there. Anyway, here is my code:
This error message occurs on the 1st line of the FormatGrid3() Sub and I just can't figure out what's causing it. I've compared the grid with other grids in my app and they're exactly the same...properties and all.Code:grd3.DataSource = dsAttachments.Tables(0).Rows FormatGrid3() ' ' ' Private Sub FormatGrid3() Try grd3.RowHeadersVisible = False grd3.Columns(0).Width = 100 grd3.Columns(0).HeaderText = "Request ID" grd3.Columns(1).Width = 140 grd3.Columns(1).HeaderText = "Image Name" grd3.Columns(2).Width = 430 grd3.Columns(2).HeaderText = "File Path" Catch ex As Exception strProcedure = "FormatGrid3()" Msg = ex.Message ErrorHandler(strModule, strProcedure, Msg) End Try End Sub
Thanks,


Reply With Quote