DEVEXPRESS的DATAGRIDVIEW和GRIDVIEW

DEVEXPRESS的DATAGRIDVIEW和GRIDVIEW,devexpress,vb.net-2010,Devexpress,Vb.net 2010,我在erp中使用datagridview,但我的一位新客户要求我使用DevXPress 现在在datagridview中,我使用了如下代码 Dim items As Boolean = False For Each row In DataGridView1.Rows If TextBox1.Text = row.Cells("Barcode").Value Then items = True

我在erp中使用datagridview,但我的一位新客户要求我使用DevXPress

现在在datagridview中,我使用了如下代码

  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
第行“对于DataGridView1.Rows中的每一行” 我无法在devexpress gridcontrol中编写此代码。 我的意思是如何编写代码,比如“gridview.rows”

我的完整代码是我想更改为DEVEXPRESS---GRIDVIEW


DevExpress GridView没有行集合。您应该改为使用for循环遍历行。有关这方面的更多信息,请参阅。例如:

for (int i = 0; i < gridView1.RowCount; i++)
{
     object barCodeValue = gridView1.GetRowCellValue(i, "Barcode");
}
for(int i=0;i
使用GridView的方法根据字段/列名和行索引检索单元格的值

使用GridView根据字段/列名和行索引设置单元格的值

另见:

for (int i = 0; i < gridView1.RowCount; i++)
{
     object barCodeValue = gridView1.GetRowCellValue(i, "Barcode");
}