الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

في الداتا جريد

بدأه atefkhalf2004 في 10 سبتمبر 2010 · 0 رد · 438 مشاهدة · في ADO.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1

لسادة الافاضل

ارغب في

اذا كانت قيمة الخلية فارغة او بها قيمة اقل من قيمة معينة يتم تلوين السطر اصفر واذا كانت غير خالية و قيمتها اكبر من او تساوي قيمة معينة يتم تلوين السطر ازرق خفيف مثلا

عند التنفيذ الاحظ رعشة في الشاشة مع عدم الخروج من زر اا\لاغلاق

ما الخطأ

If IsDBNull(e.Value) Then

e.CellStyle.ForeColor = Color.Brown

e.CellStyle.Font = New Font("Verdana", 8, FontStyle.Bold)

DataGridView1.Rows(e.RowIndex).DefaultCellStyle.BackColor = Color.SkyBlue

ElseIf Not IsNumeric(e.Value) Then

select Case e.ColumnIndex

Case 1

Case 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

If (e.Value).ToString = "*" Or (e.Value).ToString = "غ" Then

e.CellStyle.ForeColor = Color.Brown

e.CellStyle.Font = New Font("Verdana", 8, FontStyle.Bold)

DataGridView1.Rows(e.RowIndex).DefaultCellStyle.BackColor = Color.SkyBlue

End If

End select

ElseIf IsNumeric(e.Value) Then

select Case e.ColumnIndex

Case 1

Case 3, 4, 5, 6, 7, 8, 9, 12

If (e.Value) < 25 Then

e.CellStyle.ForeColor = Color.Brown

e.CellStyle.Font = New Font("Verdana", 8, FontStyle.Bold)

DataGridView1.Rows(e.RowIndex).DefaultCellStyle.BackColor = Color.Yellow

End If

Case 10, 11

If (e.Value) < 10 Then

e.CellStyle.ForeColor = Color.Brown

e.CellStyle.Font = New Font("Verdana", 8, FontStyle.Bold)

DataGridView1.Rows(e.RowIndex).DefaultCellStyle.BackColor = Color.Yellow

End If

End select

End If

مواضيع مشابهة