I am using the code below to populate the DataGridView. I need help in that the Barcode Image is not being generated according to the txtLab.text amd the alphamumeric value. Please see attached image. Thanks
Private Sub btnAdd_Click(sender As System.Object, e As System.EventArgs) Handles btnAdd.Click
Dim alphaNumeric As String = String.Empty
Dim number As String = txtSubNo.Text
Dim alphabet As String = txtAlpha.Text
Dim loopValue As String = txtNo.Text
For index As Integer = 0 To loopValue - 1
alphaNumeric = number.ToString & alphabet
C1BarCode.Text = txtLabNo.Text & "-" & alphaNumeric.ToString
DataGridView1.Rows.Add(txtLabNo.Text, "" & alphaNumeric, txtIndicator.Text, C1BarCode.Image)
If txtAlpha.Text = "" Then
Exit Sub
Else
If Asc(alphabet) + 1 <= 90 Then
alphabet = Chr(Asc(alphabet) + 1)
Else
alphabet = "A"
End If
End If
Next
End Sub
Logang 0 Newbie Poster
rproffitt 2,662 "Nothing to see here." Moderator
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.