'Declaration Public Enum ColumnStyle Inherits System.Enum
public enum ColumnStyle : System.Enum
Member | Description |
---|---|
Button | Button style that has a button occupying the whole area of the cell. When the user clicks on the button ClickCellButton event is fired. |
CheckBox | Checkbox style that is not a tri-state checkbox. |
Color | Style that allows entering Colors. |
Currency | Style 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. |
CurrencyNonNegative | Same as Currency except negative values aren't allowed. |
CurrencyPositive | Same as Currency except zero and negative values aren't allowed. |
Date | Style 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. |
DateTime | Style 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. |
DateTimeWithoutDropDown | Same as DateTime style except the drop down button is not displayed. |
DateTimeWithSpin | Same 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. |
DateWithoutDropDown | Same as Date style except the drop down button is not displayed. |
DateWithSpin | Same 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. |
Default | Use the default style. Default style is based on the column's data type and other column property settings. |
Double | Style 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. |
DoubleNonNegative | Same as Double except the user is not allowed to enter negative numbers. Note: This style uses the masking functionality. |
DoubleNonNegativeWithSpin | Same as DoubleNonNegative except this style shows spin buttons. |
DoublePositive | Same as Double except the user is not allowed to enter zero or negative numbers. Note: This style uses the masking functionality. |
DoublePositiveWithSpin | Same as DoublePositive except this style shows spin buttons. |
DoubleWithSpin | Same as Double except this style shows spin buttons. |
DropDown | Drop 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. |
DropDownCalendar | Drop down calendar style that has a drop down arrow that users can click on to display a drop down calendar for selecting a date. |
DropDownList | Drop 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. |
DropDownValidate | Same 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. |
Edit | Text box style. |
EditButton | Edit button style that has a text box as well as a button that users can click on. |
Font | Style that lets the user select a font. Infragistics.Win.FontNameEditor is used |
FormattedText | Style that displays the column data as formatted text. This does not allow editing. Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor is used. |
FormattedTextEditor | Same as FormattedText except that this allows editing as well. Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor is used. |
Image | Style that uses the Infragistics.Win.EmbeddableImageRenderer to display images. |
ImageWithShadow | Same as Image style except the images are displayed shadowed. |
Integer | Style 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. |
IntegerNonNegative | Same as Integer except the user is not allowed to enter negative numbers. |
IntegerNonNegativeWithSpin | Same as IntegerNonNegative except this style shows spin buttons. |
IntegerPositive | Same as Integer except the user is not allowed to enter zero or negative numbers. |
IntegerPositiveWithSpin | Same as IntegerPositive except this style shows spin buttons. |
IntegerWithSpin | Same as Integer except this style shows spin buttons. |
RadioButtonByBand | Style which displays the column as a radio button where only one cell in the entire band may be "checked". |
RadioButtonByRowsCollection | Style which displays the column as a radio button where only one cell in each rows collection band may be "checked". |
Time | Style 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. |
TimeWithSpin | Same as Time style except spin buttons are displayed that can be used to increment or decrement each component of the time. |
TimeZone | Style that lets the user select time zone. Infragistics.Win.TimeZoneEditor is used. |
TrackBar | Style which displays the column as a TrackBar. |
TriStateCheckBox | Tri-state checkbox style. |
URL | Style that displays the column data as a URL. Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor is used. |
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.
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; }
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