Version

SelectedCellAppearance Property (UltraGridOverride)

Returns or sets the default Appearance object for a selected cell.
Syntax
'Declaration
 
Public Property SelectedCellAppearance As Infragistics.Win.AppearanceBase
public Infragistics.Win.AppearanceBase SelectedCellAppearance {get; set;}
Remarks

The SelectedCellAppearance property is used to specify the appearance of any selected cells (you can determine which cells are selected by using the Cells property of the Selected object). When you assign an Appearance object to the SelectedCellAppearance property, the properties of that object will be applied to any cell that becomes selected. You can use the SelectedCellAppearance property to examine or change any of the appearance-related properties that are currently assigned to selected cells, for example:

UltraWinGrid1.Override.SelectedCellAppearance.BackColor = vbRed

Because you may want the selected cell(s) to look different at different levels of a hierarchical record set, SelectedCellAppearance is a property of the UltraGridOverride object. This makes it easy to specify different selected cell appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the selected cell(s) will use the grid-level setting of SelectedCellAppearance.

Example
Following code sets the SelectedCellAppearance on the layout's override and a band's override.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button3.Click

      ' Set the SelectedCellAppearance on the layout's Override.
      Me.UltraGrid1.DisplayLayout.Override.SelectedCellAppearance.BackColor = Color.Red

      ' You can override that grid-wide setting for a particular band by setting it on the 
      ' override of that band.
      Me.UltraGrid1.DisplayLayout.Bands(1).Override.SelectedCellAppearance.BackColor = Color.Green

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button3_Click(object sender, System.EventArgs e)
{

	// Set the SelectedCellAppearance on the layout's Override.
	this.ultraGrid1.DisplayLayout.Override.SelectedCellAppearance.BackColor = Color.Red;

	// You can override that grid-wide setting for a particular band by setting it on the 
	// override of that band.
	this.ultraGrid1.DisplayLayout.Bands[1].Override.SelectedCellAppearance.BackColor = Color.Green;

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also