Am using vb.net 2008 and sql2008 and I want to loop thru frmMovement.Dat aGridView1 and the checked rows shd get populated into frmMovementRece ivedFiles.DataG ridView2. But I used Cbool, Boolean.TryPars e to convert the the checked value but I still get but still the error: "Conversion from string "" to type 'Boolean' is not valid"
The code is as follows. Or ss there anyway to loop thru the checkboxes and populate them in another DatagridView2?
The code is as follows. Or ss there anyway to loop thru the checkboxes and populate them in another DatagridView2?
Code:
Dim ctr As Integer
frmMovementReceivedFiles.DataGridView2.Rows.Clear()
For ctr = 0 To frmMovement.DataGridView1.Rows.Count - 1
If frmMovement.DataGridView1.Rows(ctr).Cells("Column1").Value = True Then
frmMovementReceivedFiles.DataGridView2.Rows.Add( _
frmMovement.DataGridView1.Rows(ctr).Cells(1).Value, _
frmMovement.DataGridView1.Rows(ctr).Cells(2).Value, _
frmMovement.DataGridView1.Rows(ctr).Cells(3).Value, _
frmMovement.DataGridView1.Rows(ctr).Cells(4).Value)
End If
Next
If frmMovementReceivedFiles.DataGridView2.RowCount > 0 Then
frmMovementReceivedFiles.Show()
End If
Comment