Column Properties

Top  Previous  Next

Basic Properties

ColumnExpression

This property defines the name of the database column in the table to be edited.

Run Sample

Label

Defines the text label displayed against the column. Defaults to the value in the ColumnName property

Run Sample

PrimaryKey

At least one column must be designated as a PrimaryKey. For multi-part primary keys every column that constitutes the key must have the PrimaryKey property set. In many cases DbNetEdit is able to automatically detect that a column is a PrimaryKey and will set this property automatically.

Run Sample

Additional Properties

AutoIncrement

Indicates that the column value is auto-incrementing and therefore read-only. In the case of some columns such as SQL Server Identity columns this property is set automatically.

BaseTableName

When using a view as a data source the BaseTableName property can be used to indicate the name of the underlying table associated with the column

ColumnName

The name of the column as assigned by the database based on the ColumnExpression. The property is read-only.

Edit

Indicates that a column is or is not editable. The default is true. A column that has it's Edit property set to false is still created and it's value can still be accessed on the client via the getInputControl method

Run Sample

EditControlType

The EditControlType property allows you to manually specify the type of control used to edit the database value. A default value is assigned based on the type and size of the database column. Possible values are listed here. For example, an EditControlType of Html will make the editor an HTML Editor rather than the default Text editor for a text column.

Run Sample

ForeignKey

Indicates that the column is acting as a foreign key in a linked child form. A ForeignKey column is paired with a PrimaryKey column in the parent control in order to establish the relationship between the 2 controls.

Run Sample

Format

Specifies a format mask for a date-time or numeric value.  Values are the standard .NET date-time and numeric formatting strings. Use the EditFormat property to specify a distinct format string for the editable value.

Run Sample

Height

Specifies the height of an edit control where applicable

Run Sample

InsertReadOnly

Specifies that the column cannot be edited when a record is being added.

IsBoolean

Specifies that the column should behave like a boolean(bit) column (accepting only true/false). Some databases do not have an dedicated boolean type and with this property you can make a different data type such as small integer act like a boolean database type.

Lookup

The Lookup property is used to convert a value to/from its descriptive value typically held in a separate database table. The Lookup property is specified as an SQL statement that selects 2 columns. The first column is the foreign key column that is matched against the column value and the second value is the descriptive value. The Lookup property is used when displaying a grid value, searching against the value and editing the value.

Run Sample

The way a lookup is implemented can be controlled by setting the EditControlType property to one of the following values DropDownList (default), TextBoxLookup, SuggestLookup, TextBoxSearchLookup, ListBox or RadioButtonList

Run Sample

A Lookup can also be defined using a string of values defined in JSON array format.

Run Sample

LookupSearchMode

The LookupSearchMode property is used to indicate if the search (via the search dialog) should be made directly against the column value or indirectly against the descriptive text as defined by the Lookup property. Possible values are SearchText or SearchValue.

Run Sample

MaxThumbnailHeight

Specifies the maximum height of an image associated with a column when displayed as a thumbnail in the grid. The width of the image is scaled in proportion to the height.

Run Sample

ReadOnly

Indicates if a field is read-only in both insert and update mode. The column is displayed in the edit dialog but the value cannot be altered.

Required

When set to true then a value must be entered when editing the value

Run Sample

Search

Indicates if a column is searchable (via the search dialog). Default is true.

SequenceName

Specifies the name of an Oracle sequence or Firebird generator that is used to generate the primary key value.

Style

Specifies CSS style attributes that are applied to the column when displayed in the grid.

Run Sample

UpdateReadOnly

Specifies that the column cannot be edited when a record is being amended.

UploadExtFilter

Specifies a comma separated inclusive list of valid file extensions that can be selected for uploading.

Run Sample

UploadMaxFileSize

Specifies the maximum size in KB of a file that can be uploaded.

Run Sample

 
UploadOverwrite

Indicates if an existing file can be overwritten when uploading a new file.

Run Sample

 
UploadRename

Indicates if a file can be re-named as a part of the file upload process.

UploadRootFolder

If a column is storing the path to an uploaded file then the UploadRootFolder must be specified to indicate where on the server the uploaded files should be saved.

Run Sample

UploadSubFolder

If part of the path to an uploaded file should be stored in the column value then that portion of the path must be specified in the UploadSubFolder property

Run Sample

 

Width

Specifies the width of an edit control where applicable

Run Sample