24-07-16, 02:07 PM
ممكن تستخدم هذا الكود مؤقتاً حتى تجد الأفضل
PHP كود :
Dim colIndex As Integer = 2 ' رقم عمود الحالة '
For Each row As DataGridViewRow In Me.DataGridView1.Rows
If row.Cells(colIndex).Value = "موجود" Then
row.DefaultCellStyle.BackColor = Color.PaleGreen
ElseIf row.Cells(colIndex).Value = "اجازه" Then
row.DefaultCellStyle.BackColor = Color.LemonChiffon
ElseIf row.Cells(colIndex).Value = "غائب" Then
row.DefaultCellStyle.BackColor = Color.MistyRose
End If
Next


