8

目前这是它的样子:

在此处输入图像描述

我想改变那个蓝色,但我不知道要改变什么属性。

在此处输入图像描述

我尝试将我认为的属性更改为洋红色或其他突出的属性,以找出我需要的属性,但到目前为止还没有骰子。

有任何想法吗?

4

3 回答 3

0

为此使用“ultraGrid.DisplayLayout.Override.FilterCellAppearance”。

于 2011-07-21T14:29:39.547 回答
0

我想你可能正在寻找这样的东西。在此示例中,我正在使选定的行颜色“消失”,但您可以将它们设置为您想要的任何颜色。

'Make selected row look just like any other row
myUltraGrid.DisplayLayout.Override.ActiveRowAppearance.BackColor = Color.White
myUltraGrid.DisplayLayout.Override.ActiveRowAppearance.ForeColor = Color.Black

'Make selected cell look like any other cell
myUltraGrid.DisplayLayout.Override.ActiveCellAppearance.BackColor = Color.Black
myUltraGrid.DisplayLayout.Override.ActiveCellAppearance.ForeColor = Color.White
于 2018-02-01T15:59:33.833 回答
0

调整外观的最佳方法是在 UltraGrid 控件的 InitializeLayout 事件中,而不是调整 Designer 文件。您可以在设计时双击您的 UltraGrid,以挂钩到提到的事件。之后,您可以在为您的控件应用所需的过滤器之后,对下面的单行进行注释和取消注释,以了解最终效果是什么:

 private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
    {
        //If the row is not the ative row, you would see that color instead.
        e.Layout.Override.FilterCellAppearance.BackColor = Color.Green;

        //This would be visible when the row has filters applies, and not being active at the same time.
        e.Layout.Override.FilterCellAppearanceActive.BackColor = Color.GreenYellow;

        //The appearance that would be applied after you filtered IN some of the rows based on your filters.
        e.Layout.Override.FilteredInCellAppearance.BackColor = Color.BlueViolet;

        //After a filter is applied, and FilteredInCellAppearance is not being set.
        e.Layout.Override.FilteredInRowAppearance.BackColor = Color.Pink;

        //If FilterCellAppearance is not being set, the one below would take effect.
        e.Layout.Override.FilterRowAppearance.BackColor = Color.Plum;

        //The formatting of the filter rows, that have active filters already.
        e.Layout.Override.FilterRowAppearanceActive.BackColor = Color.PowderBlue;
    }
于 2018-02-13T12:26:37.540 回答