Version

ColumnStyle Enumeration

Enum used for specifying the UltraGridColumn.Style property.
Syntax
'Declaration
 
Public Enum ColumnStyle 
   Inherits System.Enum
public enum ColumnStyle : System.Enum 
Members
MemberDescription
ButtonButton style that has a button occupying the whole area of the cell. When the user clicks on the button ClickCellButton event is fired.
CheckBoxCheckbox style that is not a tri-state checkbox.
ColorStyle that allows entering Colors.
CurrencyStyle that allows entering currency values. Note: This style uses the masking functionality. The CurrentCulture is used to determine the number of digits and decimal places. You can control the number of digits, decimal places etc... by setting the UltraGridColumn.MaskInput property. Infragistics.Win.EditorWithMask is used.
CurrencyNonNegativeSame as Currency except negative values aren't allowed.
CurrencyPositiveSame as Currency except zero and negative values aren't allowed.
DateStyle that allows entering dates. A drop down button is displayed that shows a drop down calendar. You can control the order of day, moth and year portions by setting the UltraGridColumn.MaskInput property. Minimum and maximum allowed values can be controlled using the UltraGridColumn.MinValue and UltraGridColumn.MaxValue properties. Note: This style uses the masking functionality.
DateTimeStyle that allows entering both date and time. Time uses short time pattern for the time porition. Also a drop down button is displayed that shows a drop down calendar. You can further control the format of the date and time by setting the UltraGridColumn.MaskInput property. Minimum and maximum allowed values can be controlled using the UltraGridColumn.MinValue and UltraGridColumn.MaxValue properties. Note: This style uses the masking functionality.
DateTimeWithoutDropDownSame as DateTime style except the drop down button is not displayed.
DateTimeWithSpinSame as DateTime style except the drop down button is not displayed and in its place spin buttons are displayed that can be used to increment or decrement each component of the date time.
DateWithoutDropDownSame as Date style except the drop down button is not displayed.
DateWithSpinSame as Date style except the drop down button is not displayed and in its place spin buttons are displayed that can be used to increment or decrement each component of the date.
DefaultUse the default style. Default style is based on the column's data type and other column property settings.
DoubleStyle that allows entering double values. Note: This style uses the masking functionality. The NumberFormatInfo of the CurrentCulture is used to determine the number of digits and decimal places. You can control the number of digits, decimal places etc... by setting the UltraGridColumn.MaskInput property. Minimum and maximum allowed values can be controlled using the UltraGridColumn.MinValue and UltraGridColumn.MaxValue properties. Infragistics.Win.EditorWithMask is used.
DoubleNonNegativeSame as Double except the user is not allowed to enter negative numbers. Note: This style uses the masking functionality.
DoubleNonNegativeWithSpinSame as DoubleNonNegative except this style shows spin buttons.
DoublePositiveSame as Double except the user is not allowed to enter zero or negative numbers. Note: This style uses the masking functionality.
DoublePositiveWithSpinSame as DoublePositive except this style shows spin buttons.
DoubleWithSpinSame as Double except this style shows spin buttons.
DropDownDrop down combobox style that has a text box and a small drop down button that users can click on to display a drop down list to select items from. You must set the UltraGridColumn.ValueList property to a list of items you want to display in the drop down. Without that this style will not have any effect.
DropDownCalendarDrop down calendar style that has a drop down arrow that users can click on to display a drop down calendar for selecting a date.
DropDownListDrop down list style that has a small drop down button that users can click on to display a drop down list from which they can select an item. You must set the UltraGridColumn.ValueList property to a list of items you want to display in the drop down. Without that this style will not have any effect.
DropDownValidateSame as DropDown style except that it will not allow the user to enter text in the combobox' edit box that does not match any one of the values in the value list. You must set the UltraGridColumn.ValueList property to a list of items you want to display in the drop down. Without that this style will not have any effect.
EditText box style.
EditButtonEdit button style that has a text box as well as a button that users can click on.
FontStyle that lets the user select a font. Infragistics.Win.FontNameEditor is used
FormattedTextStyle that displays the column data as formatted text. This does not allow editing. Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor is used.
FormattedTextEditorSame as FormattedText except that this allows editing as well. Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor is used.
ImageStyle that uses the Infragistics.Win.EmbeddableImageRenderer to display images.
ImageWithShadowSame as Image style except the images are displayed shadowed.
IntegerStyle that allows entering integer (whole numbers) values. You can control the number of digits by setting the UltraGridColumn.MaskInput property. Infragistics.Win.EditorWithMask is used.
IntegerNonNegativeSame as Integer except the user is not allowed to enter negative numbers.
IntegerNonNegativeWithSpinSame as IntegerNonNegative except this style shows spin buttons.
IntegerPositiveSame as Integer except the user is not allowed to enter zero or negative numbers.
IntegerPositiveWithSpinSame as IntegerPositive except this style shows spin buttons.
IntegerWithSpinSame as Integer except this style shows spin buttons.
RadioButtonByBandStyle which displays the column as a radio button where only one cell in the entire band may be "checked".
RadioButtonByRowsCollectionStyle which displays the column as a radio button where only one cell in each rows collection band may be "checked".
TimeStyle that allows entering time. This uses the short time pattern of the current culture. You can control various aspects of the time format by setting the UltraGridColumn.MaskInput property. Minimum and maximum allowed values can be controlled using the UltraGridColumn.MinValue and UltraGridColumn.MaxValue properties. Note: This style uses the masking functionality.
TimeWithSpinSame as Time style except spin buttons are displayed that can be used to increment or decrement each component of the time.
TimeZoneStyle that lets the user select time zone. Infragistics.Win.TimeZoneEditor is used.
TrackBarStyle which displays the column as a TrackBar.
TriStateCheckBoxTri-state checkbox style.
URLStyle that displays the column data as a URL. Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor is used.
Remarks

This property is for convenience. It lets you set the edit style of a column to one of the commonly used edit styles. This list does not include all the styles that are available. If a style is not listed in this enum then you can use the UltraGridColumn.Editor property along with other properties that the UltraGridColumn object exposes, like UltraGridColumn.MinValue, UltraGridColumn.MaxValue, UltraGridColumn.MinValueExclusive, UltraGridColumn.MaxValueExclusive, UltraGridColumn.MaskInput, UltraGridColumn.FormatInfo, UltraGridColumn.Format, UltraGridColumn.MaxLength, UltraGridColumn.RegexPattern etc... to accomplish the desired column style. As a matter of fact some the styles set some of the these properties to accomplish the desired behavior. For example the CurrencyPositive style sets the UltraGridColumn.Editor to Infragistics.Win.EditorWithMask instance and the UltraGridColumn.MinValueExclusive to 0. Also you can set these properties to further refine the behavior of a column style. This is because these properties take precedence over the Style property.

Example
Following code illustrates how to create a ValueList and assign it to a column. A ValueList maps data values to text. Depending on the value assigned to Style property of the column, cells in the column act like drop down lists or combo drop downs.

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

  Private Sub Button9_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button9.Click

      ' If the value list has already been created, then return since we
      ' don't want to recreate it again.
      If Me.ultraGrid1.DisplayLayout.ValueLists.Exists("VL1") Then Return

      ' Create a value list with the key of VL1.
      Dim valueList As valueList = Me.ultraGrid1.DisplayLayout.ValueLists.Add("VL1")

      ' Add some items to it. Here the items added have numeric data values and
      ' associated display texts. What the user sees in the cells is the display 
      ' text for these underlying numeric data value. Also when the user modifies
      ' a cell and selects one of the item, what goes in the data source is the
      ' associated numeric value.
      valueList.ValueListItems.Add(1, "One")
      valueList.ValueListItems.Add(2, "Two")
      valueList.ValueListItems.Add(3, "Three")
      valueList.ValueListItems.Add(4, "Four")
      valueList.ValueListItems.Add(5, "Five")

      ' Get the column you want to use the value list in.
      Dim column As UltraGridColumn = Me.ultraGrid1.DisplayLayout.Bands(0).Columns(0)

      ' Now assign the value list to that column.
      column.ValueList = valueList

      ' Optionally set the style of that column to an appropriate drop down style.
      ' DropDownValidate style ensures that the user enters only the values found 
      ' in the value list. 
      column.Style = ColumnStyle.DropDownValidate

      ' When AutoEdit is turned on on a column with value list assigned to it, the
      ' UltraGrid auto-completes the text in the cell as the user types to a matching
      ' item in the value list. This is enabled by default, however you can turn it
      ' off by setting AutoEdit to false.
      column.AutoEdit = False

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

private void button9_Click(object sender, System.EventArgs e)
{		
	
	// If the value list has already been created, then return since we
	// don't want to recreate it again.
	if ( this.ultraGrid1.DisplayLayout.ValueLists.Exists( "VL1" ) )
		return;

	// Create a value list with the key of VL1.
	ValueList valueList = this.ultraGrid1.DisplayLayout.ValueLists.Add( "VL1" );
	
	// Add some items to it. Here the items added have numeric data values and
	// associated display texts. What the user sees in the cells is the display 
	// text for these underlying numeric data value. Also when the user modifies
	// a cell and selects one of the item, what goes in the data source is the
	// associated numeric value.
	valueList.ValueListItems.Add( 1, "One" );
	valueList.ValueListItems.Add( 2, "Two" );
	valueList.ValueListItems.Add( 3, "Three" );
	valueList.ValueListItems.Add( 4, "Four" );
	valueList.ValueListItems.Add( 5, "Five" );

	// Get the column you want to use the value list in.
	UltraGridColumn column = this.ultraGrid1.DisplayLayout.Bands[0].Columns[0];

	// Now assign the value list to that column.
	column.ValueList = valueList;
	
	// Optionally set the style of that column to an appropriate drop down style.
	// DropDownValidate style ensures that the user enters only the values found 
	// in the value list. 
	column.Style = ColumnStyle.DropDownValidate;

	// When AutoEdit is turned on on a column with value list assigned to it, the
	// UltraGrid auto-completes the text in the cell as the user types to a matching
	// item in the value list. This is enabled by default, however you can turn it
	// off by setting AutoEdit to false.
	column.AutoEdit = false;

}
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