April 07, 2003

Loop Through Datagrid

Sub RatesDataGrid_Loop()
Dim iCount as Int32
Dim txtSaveDate as String
For iCount = 0 to RatesDataGrid.Items.Count - 1

If iCount = 1 Then
txtSaveDate = RatesDataGrid.Items(iCount).Cells(5).Text
End If

If RatesDataGrid.Items(iCount).Cells(5).Text <> txtSaveDate Then
txtSaveDate = RatesDataGrid.Items(iCount).Cells(5).Text
' RatesDataGrid.Items(iCount).Cells(5).BackColor = System.Drawing.Color.AntiqueWhite
' RatesDataGrid.Items(iCount).Cells(5).ForeColor = System.Drawing.Color.Red
RatesDataGrid.Items(iCount).Cells(5).Font.Bold = true
End If
Next
End Sub

Posted by sachauncey at April 7, 2003 02:54 PM