G
Guest
Hi,
The following will only insert one row and not all the rows
Dim gvr As GridViewRow
Dim gv As GridView = Me.GridView1
Dim fileCol As New Generic.List(Of FileEntry)
Dim myFile As New FileEntry
For Each gvr In gv.Rows
With myFile
.Location = gvr.Cells(0).Text
.Name = gvr.Cells(1).Text
.Date = "2006-01-01"
.Year = gvr.Cells(7).Text
...
End With
fileCol.Add(myFile)
Next gvr
rf.InsertReceivingFile(fileCol)
When I try to break at rf.InsertReceivingFile(fileCol) there is only one
row in the collection. Am I missing something?
Thanks
The following will only insert one row and not all the rows
Dim gvr As GridViewRow
Dim gv As GridView = Me.GridView1
Dim fileCol As New Generic.List(Of FileEntry)
Dim myFile As New FileEntry
For Each gvr In gv.Rows
With myFile
.Location = gvr.Cells(0).Text
.Name = gvr.Cells(1).Text
.Date = "2006-01-01"
.Year = gvr.Cells(7).Text
...
End With
fileCol.Add(myFile)
Next gvr
rf.InsertReceivingFile(fileCol)
When I try to break at rf.InsertReceivingFile(fileCol) there is only one
row in the collection. Am I missing something?
Thanks