Hi,
all i want is to generate a random number/letter in listview per row but i don't know how to play for each....
coz' i have a list of record has already been exported to my gridview>listview
so that's why there no ID for each row all i want to put an ID for each record
here's my sample code,
lstLicense.Items.Clear()
lstLicense.Enabled = True
Dim item As New ListViewItem
Dim strCodes As String
Dim strId As String
Dim strId2 As String
Dim i As Integer
Dim zz As String
strCodes = strCodes & A
strCodes = strCodes & B
Randomize()
For i = 0 To CInt(10) - 1
strId &= Mid(strCodes, Int(Len(strCodes) * Rnd()) + 1, 1)
Next
zz = strId2 +strId
For ab As Integer = 0 To DataGridView1.Rows.Count - 2
For i = 5 To CInt(4) - 1
strId2 &= Mid(strCodes, Int(Len(strCodes) * Rnd()) + 1, 1)
Next
For Each abc As String In zz
With item
item = lstLicense.Items.Add(DataGridView1.Item(0, ab).Value.ToString, 0)
item.SubItems.Add(DataGridView1.Item(1, ab).Value.ToString)
item.SubItems.Add(abc)
End With
Next
Next
but it shows 1 character only