i was using datagridview in my erp but one of my new customer requested me to use devexpress
now in datagridview i was using a code as follow
Dim items As Boolean = False
For Each row In DataGridView1.Rows
If TextBox1.Text = row.Cells("Barcode").Value Then
items = True
Exit For
End If
Next
in line " For Each row In DataGridView1.Rows" i am not able to write this code in devexpress gridcontrol. how i can do it i mean how i can write the code somethhing like "gridview.rows"
my complete code is that i want to change for DEVEXPRESS --- GRIDVIEW
If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then
Dim items As Boolean = False
' For Each row In DATAGRIDVIEW.ROW
If DebitaccountTextEdit.Text = row.Cells("Barcode").Value Then
items = True
Exit For
End If
Next
If items = False Then
DataGridView1.Rows.Add(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text, TextBox6.Text)
MessageBox.Show(Me, "Item Added to List", "System Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
TextBox6.Clear()
Else
MessageBox.Show(Me, "Item Already Added", "System Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
End If