03-12-23, 07:25 AM
(03-12-23, 06:44 AM)أبو خالد الشكري كتب :(03-12-23, 04:26 AM)3sem كتب : ماهو كود تلوين رؤوس أعمدة الدتاجريدفيو والصفوف
كود :
' تلوين الأعمدة
For I = 0 To DataGridView1.Rows.Count - 1
DataGridView1.Rows(I).Cells(0).Style.BackColor = Color.Yellow
DataGridView1.Rows(I).Cells(1).Style.BackColor = Color.Green
DataGridView1.Rows(I).Cells(2).Style.BackColor = Color.Red
Next
الآن المطلوب هو كود تلوين عمود الأرقام
الملف المعدل موجود في المرفقات !
' المطلوب كود نلوين عمود الأرقام
DataGridView1.EnableHeadersVisualStyles = False
DataGridView1.RowHeadersWidth = 100
DataGridView1.RowHeadersDefaultCellStyle.BackColor = Color.Yellow
DataGridView1.RowHeadersDefaultCellStyle.ForeColor = Color.Red
