5/16/2010

Thiết lập màu xen kẽ cho các dòng trong DataGridView

Set Alternating Row Styles for the Windows Forms DataGridView Control
Rất đơn giản chỉ có hai dòng, một dòng cho màu mặc định, và một dòng cho màu xen kẽ.
dataGridView1.RowsDefaultCellStyle.BackColor = Color.LightBlue;
dataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.LightSkyBlue;

No comments:

Post a Comment

The 0/1 Knapsack Problem - Dynamic Programming

 References: https://www.youtube.com/watch?v=EH6h7WA7sDw  Class Item class Item { private $_weight; private $_value; public functi...