การใช้งานวีบีเน็ต
หากค่าเซลล์กริดว่างเปล่า ฉันได้รับข้อผิดพลาดเนื่องจาก "การแปลงจากสตริง "" เป็นประเภท 'Double' ไม่ถูกต้อง"
รหัส (gridview_CellLeave)
Dim z1, z2, z3, z4 As Int32
If grvList.CurrentRow.Cells(1).Value <> "" Then
z1 = grvList.CurrentRow.Cells(1).Value
End If
If grvList.CurrentRow.Cells(2).Value <> "" Then
z2 = grvList.CurrentRow.Cells(2).Value
End If
If grvList.CurrentRow.Cells(3).Value <> "" Then
z3 = grvList.CurrentRow.Cells(3).Value
End If
If grvList.CurrentRow.Cells(4).Value <> "" Then
z4 = grvList.CurrentRow.Cells(4).Value
End If
วิธีแก้ไขข้อผิดพลาดนี้
ต้องการความช่วยเหลือเกี่ยวกับโค้ด Vb.net