Documentation Docs
Documentation Docs

MatrixDropdownColumn

An auxiliary class that describes a column in a Multi-Select Matrix or Dynamic Matrix.

You can get an object of this class from the columns array or by calling the getColumnByName() method on a matrix instance.

Inherited from the following class(es):

cellType property

Specifies the type of column cells.

Possible values:

The input types are based upon standalone question types. Depending on the selected input type, the matrix column can have additional configuration properties inherited from the corresponding question type. For instance, Dropdown, Checkboxes, Radio Button Group, and Tag Box columns can specify the choices array, similar to the question types upon which they are based. Refer to the API Reference of these question types for a full list of available properties.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
default
Accepted values:
default , dropdown , checkbox , radiogroup , tagbox , text , comment , boolean , expression , rating
Implemented in:
MatrixDropdownColumn
clone method

Creates a new object that has the same type and properties as the current SurveyJS object.

Type:
() => Base
Implemented in:
Base
colCount property

Gets or sets the number of columns used to arrange choice options. Applies only to columns of "checkbox" or "radiogroup" cellType.

Default value: -1 (inherits the actual value from the parent matrix's columnColCount property)

Type:
number writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
-1
Accepted values:
-1 , 0 , 1 , 2 , 3 , 4
Implemented in:
MatrixDropdownColumn

An expression used to calculate the column's default value. This expression applies to all cells of this column until the cell value is specified by an end user or programmatically.

Expressions

Type:
string writable
Implemented in:
MatrixDropdownColumn
See also:
setValueExpression
enableIf property

A Boolean expression. If it evaluates to false, this column becomes read-only.

Refer to the following help topic for more information: Conditional Visibility.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
readOnly
fromJSON method

Assigns a new configuration to the current SurveyJS object. This configuration is taken from a passed JSON object.

The JSON object should contain only serializable properties of this SurveyJS object. Event handlers and properties that do not belong to the SurveyJS object are ignored.

Type:
(json: any, options?: ILoadFromJSONOptions) => void
Parameters:
json, type: any ,

A JSON object with properties that you want to apply to the current SurveyJS object.

options, type: ILoadFromJSONOptions ,

An object with configuration options.

Implemented in:
Base
See also:
toJSON

Returns a JsonObjectProperty object with metadata about a serializable property that belongs to the current SurveyJS object.

If the property is not found, this method returns null.

Type:
(propName: string) => JsonObjectProperty
Parameters:
propName, type: string ,

A property name.

Implemented in:
Base

Returns the value of a property with a specified name.

If the property is not found or does not have a value, this method returns either undefined, defaultValue specified in the property configuration, or a value passed as the defaultValue parameter.

Type:
(name: string, defaultValue?: any) => any
Parameters:
name, type: string ,

A property name.

defaultValue, type: any ,

(Optional) A value to return if the property is not found or does not have a value.

Implemented in:
Base
getType method

Returns the object type as it is used in the JSON schema.

Type:
() => string
Implemented in:
Base
inSurvey property

Returns true if the object is included in a survey.

This property may return false, for example, when you create a survey model dynamically.

Type:
boolean readonly
Implemented in:
Base

Use this method to find out if the current object is of a given typeName or inherited from it.

Type:
(typeName: string) => boolean
Parameters:
typeName, type: string ,

One of the values listed in the getType() description.

Return Value:

true if the current object is of a given typeName or inherited from it.

Implemented in:
Base
See also:
getType
isDesignMode property

Returns true if the survey is being designed in Survey Creator.

Type:
boolean readonly
Implemented in:
Base

Returns true if the object configuration is being loaded from JSON.

Type:
boolean readonly
Implemented in:
Base
isRequired property

Marks the column as required. If a respondent skips any cell in a required column, the matrix displays a validation error.

If you want to mark the column as required based on a condition, specify the requiredIf property.

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
visible * , readOnly
isUnique property

Specifies whether a respondent is required to provide a unique response for each question within this column.

Default value: false

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
isValueEmpty method

Returns true if a passed value is an empty string, array, or object or if it equals to undefined or null.

Type:
(value: any, trimString?: boolean) => boolean
Parameters:
value, type: any ,

A value to be checked.

trimString, type: boolean ,

(Optional) When this parameter is true, the method ignores whitespace characters at the beginning and end of a string value. Pass false to disable this functionality.

Implemented in:
Base
minWidth property

Gets or sets minimum column width in CSS values. By default, the matrix calculates column widths to optimally fit the content of all columns.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
width
name property

A column ID that is not visible to respondents.

Column IDs must be unique.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
title

An event that is raised when an ItemValue property is changed.

Parameters:

  • sender: this
    A SurveyJS object whose property contains an array of ItemValue objects.
  • options.obj: ItemValue
    An ItemValue object.
  • options.propertyName: string
    The name of the property to which an array of ItemValue objects is assigned (for example, "choices" or "rows").
  • options.name: "text" | "value"
    The name of the changed property.
  • options.newValue: any
    A new value for the property.
Type:
Event<(sender: Base, options: any) => any, Base, any>
Implemented in:
Base

An event that is raised when a property of this SurveyJS object has changed.

Parameters:

  • sender: this
    A SurveyJS object whose property has changed.
  • options.name: string
    The name of the changed property.
  • options.newValue: any
    A new value for the property.
  • options.oldValue: any
    An old value of the property. If the property is an array, oldValue contains the same array as newValue does.

If you need to add and remove property change event handlers dynamically, use the registerPropertyChangedHandlers and unregisterPropertyChangedHandlers methods instead.

Type:
EventBase<Base, any>
Implemented in:
Base
readOnly property

Makes the column read-only.

If you want to switch the column to the read-only state based on a condition, specify the enableIf property.

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
visible * , isRequired

Registers a single value change handler for one or multiple properties.

The registerPropertyChangedHandlers and unregisterPropertyChangedHandlers methods allow you to manage property change event handlers dynamically. If you only need to attach an event handler without removing it afterwards, you can use the onPropertyChanged event instead.

Type:
(propertyNames: string[], handler: any, key?: string) => void
Parameters:
propertyNames, type: string[] ,

An array of one or multiple property names.

handler, type: any ,

A function to call when one of the listed properties change. Accepts a new property value as an argument.

key, type: string ,

(Optional) A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.

Implemented in:
Base
See also:
unregisterPropertyChangedHandlers

Specifies a custom error message for a required column.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
isRequired
requiredIf property

A Boolean expression. If it evaluates to true, this column becomes required.

Refer to the following help topic for more information: Conditional Visibility.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
isRequired
resetValueIf property

A Boolean expression. If it evaluates to true, all cells in this column are set to a value calculated using the defaultValueExpression.

Expressions

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
setValueIf

Assigns a new value to a specified property.

Type:
(name: string, val: any) => void
Parameters:
name, type: string ,

A property name.

val, type: any ,

A new value for the property.

Implemented in:
Base

An expression used to calculate a value for all column cells.

You can use setValueExpression as a standalone property or in conjunction with the setValueIf expression, in which case the calculated cell value applies only when setValueIf evaluates to true.

Expressions

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
defaultValueExpression * , resetValueIf
setValueIf property

A Boolean expression. If it evaluates to true, all cells in this column are set to a value calculated using the setValueExpression.

Expressions

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
resetValueIf

Specifies whether to create an individual column for each choice option. Applies only to columns of "checkbox" or "radiogroup" cellType.

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
title property

A user-friendly column caption to display. If title is undefined, name is displayed instead.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
toJSON method

Returns a JSON object that corresponds to the current SurveyJS object.

Type:
(options?: ISaveToJSONOptions) => any
Parameters:
options, type: ISaveToJSONOptions
Implemented in:
Base
See also:
fromJSON
totalAlignment property

An alignment for calculated total values.

Possible values:

  • "left"
  • "center"
  • "right"
  • "auto" (default) - Applies one of the values above based on the column's cell type.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
auto
Accepted values:
auto , left , center , right
Implemented in:
MatrixDropdownColumn
See also:
totalType * , totalFormat * , totalCurrency * , totalDisplayStyle
totalCurrency property

Specifies a currency used to display calculated total values. Applies only if totalDisplayStyle is set to "currency".

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
USD
Accepted values:
AED , AFN , ALL , AMD , ANG , AOA , ARS , AUD , AWG , AZN , BAM , BBD , BDT , BGN , BHD , BIF , BMD , BND , BOB , BOV , BRL , BSD , BTN , BWP , BYN , BZD , CAD , CDF , CHE , CHF , CHW , CLF , CLP , CNY , COP , COU , CRC , CUC , CUP , CVE , CZK , DJF , DKK , DOP , DZD , EGP , ERN , ETB , EUR , FJD , FKP , GBP , GEL , GHS , GIP , GMD , GNF , GTQ , GYD , HKD , HNL , HRK , HTG , HUF , IDR , ILS , INR , IQD , IRR , ISK , JMD , JOD , JPY , KES , KGS , KHR , KMF , KPW , KRW , KWD , KYD , KZT , LAK , LBP , LKR , LRD , LSL , LYD , MAD , MDL , MGA , MKD , MMK , MNT , MOP , MRO , MUR , MVR , MWK , MXN , MXV , MYR , MZN , NAD , NGN , NIO , NOK , NPR , NZD , OMR , PAB , PEN , PGK , PHP , PKR , PLN , PYG , QAR , RON , RSD , RUB , RWF , SAR , SBD , SCR , SDG , SEK , SGD , SHP , SLL , SOS , SRD , SSP , STD , SVC , SYP , SZL , THB , TJS , TMT , TND , TOP , TRY , TTD , TWD , TZS , UAH , UGX , USD , USN , UYI , UYU , UZS , VEF , VND , VUV , WST , XAF , XAG , XAU , XBA , XBB , XBC , XBD , XCD , XDR , XOF , XPD , XPF , XPT , XSU , XTS , XUA , XXX , YER , ZAR , ZMW , ZWL
Implemented in:
MatrixDropdownColumn
See also:
totalType

A format for calculated total values.

Possible values:

  • "none" (default)
  • "decimal"
  • "currency"
  • "percent"

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
none
Accepted values:
none , decimal , currency , percent
Implemented in:
MatrixDropdownColumn
See also:
totalType * , totalFormat * , totalCurrency
totalExpression property

An expression used to calculate total values. Overrides the totalType property.

Expressions

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
totalFormat property

A string pattern used to display column totals. To reference a total value within this pattern, use the {0} placeholder.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
totalType * , totalDisplayStyle
totalType property

An aggregation method used to calculate the column total.

Possible values:

  • "none" (default) - Disables total calculations.
  • "sum"
  • "count"
  • "min"
  • "max"
  • "avg"

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
none
Accepted values:
none , sum , count , min , max , avg
Implemented in:
MatrixDropdownColumn
See also:
totalFormat * , totalDisplayStyle

Unregisters value change event handlers for the specified properties.

Type:
(propertyNames: string[], key?: string) => void
Parameters:
propertyNames, type: string[] ,

An array of one or multiple property names.

key, type: string ,

(Optional) A key of the registration that you want to cancel.

Implemented in:
Base
See also:
registerPropertyChangedHandlers
validators property

Column validators.

Data Validation

Type:
SurveyValidator[] writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
isRequired
visible property

Gets or sets column visibility.

If you want to display or hide a column based on a condition, specify the visibleIf property.

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
MatrixDropdownColumn
See also:
isRequired * , readOnly
visibleIf property

A Boolean expression. If it evaluates to false, this column becomes hidden.

Refer to the following help topic for more information: Conditional Visibility.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
visible
width property

Gets or sets column width in CSS values. By default, the matrix calculates column widths to optimally fit the content of all columns.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
MatrixDropdownColumn
See also:
minWidth

Copyright © 2024 Devsoft Baltic OÜ. All rights reserved.

Your cookie settings

We use cookies on our site to make your browsing experience more convenient and personal. In some cases, they are essential to making the site work properly. By clicking "Accept All", you consent to the use of all cookies in accordance with our Terms of Use & Privacy Statement. However, you may visit "Cookie settings" to provide a controlled consent.

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.