io sinceramente farei così:
codice:Private Sub MESSINADataGridView_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles MESSINADataGridView.CellFormatting Dim drv As DataRowView If e.RowIndex = -1 Then Exit Sub If e.RowIndex <= InterventiDataSet1.Tables("messina").Rows.Count - 1 Then drv = InterventiDataSet1.Tables("ARRIVO").DefaultView.Item(e.RowIndex) With MESSINADataGridView.Rows(e.RowIndex).Cells(e.ColumnIndex) .Style.BackColor = Color.Pink If drv.Item("ARRIVO").ToString = "M" Then .Style.BackColor = Color.LightBlue End With End If End Sub

Rispondi quotando