Infragistics(R) NetAdvantage(R) Windows Forms
CellButtonAppearance Property
See Also  Example E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace > UltraGridOverride Class : CellButtonAppearance Property

Determines the formatting attributes that will be applied to the buttons in cells in a band or the grid.

Syntax

Visual Basic (Declaration) 
Public Property CellButtonAppearance As Infragistics.Win.AppearanceBase
C# 
public Infragistics.Win.AppearanceBase CellButtonAppearance {get; set;}

Example

Following code sets AllowGroupBy property on various objects in the UltraGrid.

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button8_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button8.Click

      ' CellButtonAppearance applies to the buttons in cells. These buttons include
      ' dropdown arrow buttons, as well as column styles of Button and EditButton.

      Dim layout As UltraGridLayout = Me.ultraGrid1.DisplayLayout
      Dim band As UltraGridBand = layout.Bands(0)
      Dim column As UltraGridColumn = band.Columns(0)

      ' Set grid-wide CellButtonAppearance by using the layout's Override.
      layout.Override.CellButtonAppearance.BackColor = Color.Yellow

      ' You can override CellButtonAppearance for a particular band by setting that
      ' band's Override.CellButtonAppearance.
      band.Override.CellButtonAppearance.BackColor = Color.Magenta

      ' You can override above CellButtonAppearance settings for a column by setting
      ' column's CellButtonAppearance.
      column.CellButtonAppearance.BackColor = Color.Red

  End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

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

	// CellButtonAppearance applies to the buttons in cells. These buttons include
	// dropdown arrow buttons, as well as column styles of Button and EditButton.

	UltraGridLayout layout = this.ultraGrid1.DisplayLayout;
	UltraGridBand   band   = layout.Bands[0];
	UltraGridColumn column = band.Columns[0];
	
	// Set grid-wide CellButtonAppearance by using the layout's Override.
	layout.Override.CellButtonAppearance.BackColor = Color.Yellow;

	// You can override CellButtonAppearance for a particular band by setting that
	// band's Override.CellButtonAppearance.
	band.Override.CellButtonAppearance.BackColor = Color.Magenta;

	// You can override above CellButtonAppearance settings for a column by setting
	// column's CellButtonAppearance.
	column.CellButtonAppearance.BackColor = Color.Red;

}

See Also