|
Column Properties |
Top Previous Next |
|
This property defines the expression that represents the column in the grid. In most cases this is simply the column name but can also be a more complex SQL expression that is supported by the database
Defines the text label displayed against the column. Defaults to the value in the ColumnName property
For a grid to be editable or to act as a parent to a child control it is necessary for at least one column to 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 DbNetGrid is able to automatically detect that a column is a PrimaryKey and will set this property automatically.
The Aggregate property specifies that an aggregate value for the column should be displayed in an aggregate row at the foot of the grid. Possible values are Sum, Avg, Min, Max and Count.
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.
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 This property determines how a boolean database value is displayed in the grid. Possible values are Checkbox, TrueFalse and YesNo.
The name of the column as assigned by the database based on the ColumnExpression. The property is read-only. Indicates that a column is not displayed in the grid. Used for columns that are editable or searchable but not to be displayed.
Indicates that a column is or is not editable. The default is true.
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. For example, an EditControlType of Html will make the editor an HTML Editor rather than the default Text editor for a text column. Edit Control Types
Specifies an edit format mask if different from the display Format property. Values are the standard .NET date-time and numeric formatting strings.
Specifies a lookup for an edit column when different from the Lookup property.
Specifies the maximum height of an image associated with a column when displayed as a thumbnail in the edit dialog. The width of the image is scaled in proportion to the height.
Allows CSS style attributes to be assigned to an edit field.
Indicates that the column has a drop-down filter in the grid header.
Indicates that the column is acting as a foreign key in a child grid (either linked or nested). A ForeignKey column is paired with a PrimaryKey column in the parent control in order to establish the relationship between the 2 controls.
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.
Specifies that the column cannot be edited when a record is being added.
Specifies that the column should behave like a boolean (bit) column (accepting only true/false). Some databases do not have a dedicated boolean type and with this property you can make a different data type such as small integer act like a boolean database type.
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.
The way a lookup is implemented in the Edit Dialog can be controlled by setting the EditControlType property to one of the following values DropDownList (default), TextBoxLookup, SuggestLookup, TextBoxSearchLookup, ListBox or RadioButtonList A Lookup can also be defined using a string of values defined in JSON array format.
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.
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.
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.
When set to true then a value must be entered when editing the value
Indicates if a column is searchable (via the search dialog). Default is true.
Specifies the name of an Oracle sequence or Firebird generator that is used to generate the primary key value.
Specifies CSS style attributes that are applied to the column when displayed in the grid.
Specifies that the column cannot be edited when a record is being amended.
Specifies a comma separated inclusive list of valid file extensions that can be selected for uploading.
Specifies the maximum size in KB of a file that can be uploaded.
Indicates if an existing file can be overwritten when uploading a new file.
Indicates if a file can be re-named as a part of the file upload process.
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.
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
Specifies the width of a column
|