Infragistics(R) NetAdvantage(R) Windows Forms
CellDisplayStyle Enumeration
Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : CellDisplayStyle Enumeration

Enum for specifying CellDisplayStyle property.

Syntax

Visual Basic (Declaration) 
Public Enum CellDisplayStyle 
   Inherits System.Enum
C# 
public enum CellDisplayStyle : System.Enum 

Members

MemberDescription
DefaultDefault is resolved to FullEditorDisplay.
FormattedText Formatted text.
FullEditorDisplay Embeddable editor element.
PlainText Plain text without any formatting.

Example

Following code sets the CellDisplayStyle on various objects.

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

    Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout
        ' CellDisplayStyle can be set on the layout's Override in which case it
        ' will effect the whole grid.
        e.Layout.Override.CellDisplayStyle = CellDisplayStyle.PlainText

        ' It can be set on the override of a band in which case it will effect
        ' only that band.
        e.Layout.Bands(0).Override.CellDisplayStyle = CellDisplayStyle.PlainText

        ' It can also be set on a column in which case it will effect only that 
        ' column.
        e.Layout.Bands(0).Columns(0).CellDisplayStyle = CellDisplayStyle.FullEditorDisplay

        ' It can be also set on an individual cell.
        Dim cell As UltraGridCell = e.Layout.Grid.Rows(0).Cells(0)
        cell.CellDisplayStyle = CellDisplayStyle.FullEditorDisplay
    End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

		private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
		{
			// CellDisplayStyle can be set on the layout's Override in which case it
			// will effect the whole grid.
			e.Layout.Override.CellDisplayStyle = CellDisplayStyle.PlainText;

			// It can be set on the override of a band in which case it will effect
			// only that band.
			e.Layout.Bands[0].Override.CellDisplayStyle = CellDisplayStyle.PlainText;

			// It can also be set on a column in which case it will effect only that 
			// column.
			e.Layout.Bands[0].Columns[0].CellDisplayStyle = CellDisplayStyle.FullEditorDisplay;

			// It can be also set on an individual cell.
			UltraGridCell cell = e.Layout.Grid.Rows[0].Cells[0];
			cell.CellDisplayStyle = CellDisplayStyle.FullEditorDisplay;
		}

Remarks

See Also