How to change background color in UltraGrid Infragistics filter string?

Currently it looks like this:

enter image description here

I want to change this blue color, but I do not know which property to change.

enter image description here

I tried to change what, in my opinion, is a magenta property or something that stands out in an attempt to figure out which property I need, but there are still no cubes.

Any ideas?

+8
source share
3 answers

Use "ultraGrid.DisplayLayout.Override.FilterCellAppearance" for this.

0
source

I think you can look for something like this. In this example, I make the highlighted line colors โ€œdisappearโ€, but you can set them to any color you want.

'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 
0
source

The best way to customize the look would be in the InitializeLayout event of your UltraGrid control, and not in customizing Designer files. You can double-click on your UltraGrid, and during development, to connect to the specified event. After that, you can comment and uncomment the individual lines below to get an idea of โ€‹โ€‹which effect will be your last, after you apply the necessary filters for your control:

  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; } 
0
source

Source: https://habr.com/ru/post/893274/


All Articles