Dim DTT As New DataTable
Dim DTROW As DataRow
DTROW = DTT.NewRow
With DTT
.Columns.Add("BULAN0")
.Columns.Add("BULAN1")
.Columns.Add("BULAN2")
For YY = 0 To 2
If YY.ToString = 0 Then
DTROW.Item("BULAN0") = "NOL"
ElseIf YY.ToString = 1 Then
DTROW.Item("BULAN1") = "SATU"
ElseIf YY.ToString = 2 Then
DTROW.Item("BULAN2") = "DUA"
End If
Next
.Rows.Add(DTROW)
End With
DataGridView1.DataSource = DTT
Comments
Post a Comment