Dev express 笔记

1、设置treelist不同行的颜色

void treeList1_CustomDrawNodeCell(object sender, DevExpress.XtraTreeList.CustomDrawNodeCellEventArgs e)
        {
            if (e.Column == treeListColumn1) {
                if (e.CellValue.ToString() == "1") {
                    e.Appearance.BackColor = Color.Red;
                    e.Appearance.Options.UseBackColor = true;
                    e.Appearance.ForeColor = Color.Yellow;
                    e.Appearance.Options.UseForeColor = true;
                }
            }
        }

2、DataGridView 添加数据

 

posted on 2016-03-19 20:39  jin_qi_er  阅读(172)  评论(0编辑  收藏  举报