DEVEXPRESS控件使用技巧记录-GRIDCONTROL

1. 存在父子表的时候,只允许父表的一条记录展开,其他记录都收起

方法:Feature Browser -> Master-Detail -> behavior -> AllowOnlyOneMasterRowExpanded = ture 即可。

2. 加载后默认首行的颜色

方法:Feature Browser -> Focus,Selection,Navigation -> Row And Cell Selection -> Appearance 

下面 分别要设置HideSelectionRow和SelectedRow 下面的背景色

另外如果只想要整行变色 某个单元格不变色 可以Feature Browser -> Focus,Selection,Navigation -> Focus -> Focus Appearance

将EnableAppearanceFocusedCell = False 即可

原文地址:https://www.cnblogs.com/hustsay23/p/4483815.html