The Column Element
A element representing a column in a Datasheet.
Attributes and Elements
General Attributes
Attribute | Description | Required |
---|---|---|
name | The name of the column. | Yes |
displayName | A description (or title) for the column | No |
dataType | The data type of the column. See Data Types below. | Yes |
validationType | The validation type of the column. See Validation Types below. | No |
validationCondition | The validation condition of the column. See Validation Conditions below. | No |
formula1 | The first formula for the validationType and validationCondition. | No |
formula2 | The second formula for the validationType and validationCondition. | No |
allowDbNull | Whether or not to allow NULL values. | No |
isOptional | Whether or not the column is optional in the UI. | No |
isPrimary | Whether or not the column is the primary key column for the Datasheet. | No |
isReadOnly | Whether or not the column is read-only. | No |
isCompositeIndex | Index for the column(s) that are frequently used to select data. For example, the columns that are part of a Stochastic Time Chart filter are normally indexed. To create such an index, set this attribute for one or more columns in your table. | No |
defaultValue | Each column can have a default value that will be used when a new row is created. Set this attribute to the value you want to use as the default. | No |
isVisible | Whether or not this column should be visible in the user interface. The default is True. | No |
isExternalFile | Whether or not this column contains an external file. SyncroSim will copy such files to its external file folders and manage them automatically. The dataType for such a column must be "String". | No |
externalFileFilter | Indicates which file extensions to filter for in the user interface when selecting an external file. The format for this filter is the same as the format for the WinForms OpenFileDialog. Example: "txt files (*.txt)|.txt|All files (*.*)|*.*". | No |
format | Specifies a .Net compatible format string for the column. | No |
fillWeight | Gets or sets a value representing the width of the column when it is in fill mode relative to the widths of other fill-mode columns. The default is 100. | No |
autoSizeMode | Gets or sets the mode by which the column automatically adjusts its width. This value can be "Fill" or "None". If the autoSizeMode is "Fill" then the fillWeight attribute is used to set the width of the column relative to the widths of the other fill-mode columns. If the autoSizeMode is "None" then the width of the column is set to the value of the width attribute. The default is "Fill". | No |
width | Gets or sets the width of the column in pixels. The default is 100. | No |
allowSpecialColumns | Allows the creation of special columns in the default multi-row datafeed view, such as external file columns and associated buttons. Default is true. | No |
autoGroup | Sets whether a datasheet can be automatically grouped in the UI based on the string values in one of its columns. If intended for auto-grouping, the column names must be in the form "string-string-..." where all strings are group names except the final one. For project scoped datasheets with the 'autoGroup' attribute, the auto-grouping column is the 'displayMember' column. Currently, only the chart UI respects this attribute for project scoped datasheets. | No |
viewFilterColumn | A scenario scoped datasheet can use the system FilteredDataFeedView to separate the datasheet's data into groups based on the values in a particular column. If this view is used, the 'viewFilterColumn' must specify a column with "Datasheet" validation type, and the specified datasheet must be an "autoGroup" datasheet. | No |
columnAlignment | Specifies the alighnment of the values in a datasheet column. Allowed values are "Right", "Left", and "Center." If not specifed, numerical values are right-aligned and all other values are left-aligned. | No |
externalFileAbsolute | Specifies that a column is an external file column with an absolute path. Such external files are not copied to the library's external file folders, and the absolute path is preserved in the datasheet record. | No |
includeExtensions | Specifies the additional file extensions that should be included when managing an external file. For example, the external file "myfile.abc" might also require "myfile.def" and "myfile.ghi" to be copied to the library's external file folders and otherwise managed as a unit. In this case, the 'includeExtensions' attribute should be set to "def|ghi". | No |
initOptionalVisible | Makes an optional column initially visible in the default multi-row datafeed view. | No |
isColor | Indicates that a column contains an RGB color value. The default multi-row datafeed view will provide a custom display and color editor for columns marked with this attribute. An "isColor" column must have a data type of "String". | No |
displayNameColumn | The display name for certain SyncroSim objects (specifically transformers and datafeeds) can come from an external single-row datasheet (e.g. "Terminology"in ST-Sim.) To use an external display name, set the "displayNameSource" to the external datasheet name and set the "displayNameColumn" to the column in that datasheet which contains the object name. | No |
displayNameSource | The display name for certain SyncroSim objects (specifically transformers and datafeeds) can come from an external single-row datasheet (e.g. "Terminology"in ST-Sim.) To use an external display name, set the "displayNameSource" to the external datasheet name and set the "displayNameColumn" to the column in that datasheet which contains the object name. | No |
Important
The value for the name attribute must be valid for a SQL column.
Chart and Map-specific Attributes
Attribute | Description | Required |
---|---|---|
isRaster | Indicates that an isExternalFile column contains a raster file. | No |
bandColumn | If a Datasheet contains spatial data, it must have a "Band" column so that the spatial files can be multi-banded. The column specified by this attribute must have a dataType of "Integer". | No |
bandFilterColumn | A Datasheet that contains spatial data can be separated into sub-groups based on a single column with validationType of "Datasheet". | No |
filenameCode | Specifies a naming code for files that have been multi-banded into sub-groups using a bandFilterColumn. | No |
isPngImage | Indicates that a datasheet column containing an external file should be treated as a PNG file instead of a raster when displayed in the stochastic time image viewer. | No |
Child Elements
None.
Parent Elements
Element |
---|
columns |
Data Types
Value | Description |
---|---|
Boolean | The column will contain boolean values only |
Integer | The column will contain integer values only |
Double | The column will contain double values only |
String | The column will contain string values only |
Date | The column will contain date values only |
Validation Types
Value | Description |
---|---|
AnyValue | The column data can be any value |
String | The column data must be a string |
WholeNumber | The column data must be a whole number (i.e. an integer) |
Decimal | The column data must be a a decimal (i.e. a double) |
Date | The column data must be a date |
Unique | The column data must be unique |
List | The column data must come from the list specified by formula1 |
Datasheet | The column data must come from the Datasheet specified by formula1 |
Examples
If the validationType is "List" then the value for formula1 must be a list of key/value pairs separated by the pipe character.
validationType="List" formula1="1:Acres|2:Hectares|3:Square Kilometers|4:SquareMiles"
If the validationType is "Datasheet" then:
- The column's Datasheet must have a Project or Scenario scope.
- The formula1 value must be the name of a Datasheet with a Project scope.
validationType="Datasheet" formula1="stsim_Stratum"
Validation Conditions
Value | Description |
---|---|
None | No validation is required |
Between | The value must be between formula1 and formula2 |
Equal | The value must be equal to formula1 |
Greater | The value must be greater than formula1 |
GreaterEqual | The value must be greater than or equal formula1 |
Less | The value must be less than formula1 |
LessEqual | The value must less than or equal to formula1 |
NotBetween | The value must not be between formula1 and formula2 |
NotEqual | The value must not be equal to value for formula1 |
Examples
Ensure that the value for the column is a decimal greater than or equal to zero:
validationType="Decimal" validationCondition="GreaterEqual" formula1="0.0"
Ensure that the value for the column is a whole number between -90 and 90 inclusive:
validationType="WholeNumber" validationCondition="Between" formula1="-90" formula2="90"
The Boolean Data Type
A column with a Boolean data type can contain the following values:
Value | Description |
---|---|
zero | Interpreted as FALSE |
not zero | Interpreted as TRUE. By convention this value should be set to -1. |
NULL | Interpreted as FALSE |