Version

CellAppearance Property (UltraGridGroup)

Determines the formatting attributes that will be applied to the cells in a group.
Syntax
'Declaration
 
Public Property CellAppearance As Infragistics.Win.AppearanceBase
public Infragistics.Win.AppearanceBase CellAppearance {get; set;}
Remarks

The CellAppearance property is used to specify the appearance of all the cells in a row. When you assign an Appearance object to the CellAppearance property, the properties of that object will be applied to all the cells belonging to the row. You can use the CellAppearance property to examine or change any of the appearance-related properties that are currently assigned to the cells, for example:

UltraWinGrid1.Override.CellAppearance.BackColor = vbYellow

You can override the CellAppearance setting for specific cells by setting the Appearance property of the UltraGridCell object directly. The cell will always use the values of its own Appearance object before it will use the values inherited from the Appearance object specified by the CellAppearance property of the row or band it occupies.

If any of the properties of the Appearance object specified for the CellAppearance property are set to default values, the properties from the Appearance object of the row containing the cell are used.

Example
Following code shows how to create a group and shows some of the properties off the group.

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

  Private Sub Button121_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button121.Click

      ' Get the band to have the groups in.
      Dim band As UltraGridBand = Me.UltraGrid1.DisplayLayout.Bands(0)

      ' Clear existing groups if any.
      band.Groups.Clear()

      ' Add a group with the key of G1 and the caption of Address Info.
      band.Groups.Add("G1", "Address Info")

      ' Add some columns to the group.
      band.Groups("G1").Columns.Add(band.Columns("CustomerID"), 0)
      band.Groups("G1").Columns.Add(band.Columns("ContactName"), 1)
      band.Groups("G1").Columns.Add(band.Columns("City"), 2)
      band.Groups("G1").Columns.Add(band.Columns("Region"), 3)
      band.Groups("G1").Columns.Add(band.Columns("Country"), 4)

  End Sub

  Private Sub Button120_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button120.Click

      Dim group As UltraGridGroup = Me.UltraGrid1.DisplayLayout.Bands(0).Groups("G1")

      ' Set Width to 600. Extent property returns the same value as Width but unlike 
      ' Width, Extent is read-only.
      group.Width = 600
      Debug.WriteLine("Group width = " & group.Width & ", Extent = " & group.Extent)

      ' Set the appearance of the group header.
      group.Header.Appearance.BackColor = Color.Red

      ' You can change the caption by setting the caption.
      group.Header.Caption = "Group Caption"

      ' You can also set the appearance of cells in columns that belong to this group.
      group.CellAppearance.BackColor = Color.LightSkyBlue

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

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

	// Get the band to have the groups in.
	UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];
	 		
	// Clear existing groups if any.
	band.Groups.Clear( );
	 	
	// Add a group with the key of G1 and the caption of Address Info.
	band.Groups.Add( "G1", "Address Info" );

	// Add some columns to the group.
	band.Groups["G1"].Columns.Add( band.Columns["CustomerID"],    0 );
	band.Groups["G1"].Columns.Add( band.Columns["ContactName"],   1 );
	band.Groups["G1"].Columns.Add( band.Columns["City"],          2 );
	band.Groups["G1"].Columns.Add( band.Columns["Region"],        3 );
	band.Groups["G1"].Columns.Add( band.Columns["Country"],       4 );

}

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

	UltraGridGroup group = this.ultraGrid1.DisplayLayout.Bands[0].Groups["G1"];

	// Set Width to 600. Extent property returns the same value as Width but unlike 
	// Width, Extent is read-only.
	group.Width = 600;
	Debug.WriteLine( "Group width = " + group.Width + ", Extent = " + group.Extent );

	// Set the appearance of the group header.
	group.Header.Appearance.BackColor = Color.Red;

	// You can change the caption by setting the caption.
	group.Header.Caption = "Group Caption";

	// You can also set the appearance of cells in columns that belong to this group.
	group.CellAppearance.BackColor = Color.LightSkyBlue;

}
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