Remove Cell DataGrid

Dim i As Integer

For i = 0 To ds.Tables("violation").Rows.Count - 1


If CInt(ds.Tables("violation").Rows(i).Item("violationcode")) = Violationid Then ds.Tables("violation").Rows.RemoveAt(i)

ds.Tables("violation").AcceptChanges()

Violationid = Nothing

Exit For

End IF

Next


With gridViolation

For p = 0 To gridViolation.Rows.Count - 1
If .Rows(p).Selected = True Then

.CurrentCell = .Item(2, p)
CurrentCell = CStr(gridViolation.Rows(p).Cells(1).Value)
Violationid = CInt(gridViolation.Rows(p).Cells(0).Value)
CurrentProjectName = CurrentCell
Exit For

End If

Next


End With

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้