QuestionMatrixDropdownModelBase
A base class for the QuestionMatrixDropdownModel and QuestionMatrixDynamicModel classes.
Properties
Methods
Events
Specifies whether to apply shading to alternate matrix rows.
- Type:
- boolean readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionMatrixDropdownModelBase
Specifies the error message position relative to matrix cells.
Possible values:
"default"(default) - Inherits the setting from theerrorLocationproperty."top"- Displays error messages above matrix cells."bottom"- Displays error messages below matrix cells.
- Type:
- string readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- default
- Accepted values:
- default , top , bottom
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- detailErrorLocation
Specifies the type of matrix cells. You can override this property for individual columns.
Possible values:
"dropdown""checkbox""radiogroup""tagbox""text""comment""boolean""expression""rating""slider"
Default value: "dropdown" (inherited from settings.matrix.defaultCellType)
- Type:
- string readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- dropdown
- Accepted values:
- dropdown , checkbox , radiogroup , tagbox , text , comment , boolean , expression , rating , slider
- Implemented in:
- QuestionMatrixDropdownModelBase
Gets or sets choice items for Dropdown, Checkbox, and Radiogroup matrix cells. You can override this property for individual columns.
This property accepts an array of objects with the following structure:
{
"value": any, // A value to be saved in survey results
"text": string, // A display text. This property supports Markdown. When `text` is undefined, `value` is used.
"customProperty": any // Any property that you find useful.
}
To enable Markdown support for the text property, implement Markdown-to-HTML conversion in the onTextMarkdown event handler. For an example, refer to the following demo: Convert Markdown to HTML with markdown-it.
If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: Add Custom Properties to Property Grid.
If you need to specify only the value property, you can set the choices property to an array of primitive values, for example, [ "item1", "item2", "item3" ]. These values are both saved in survey results and used as display text.
- Type:
- any[] writable
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- []
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- cellType
Specifies the number of columns in Radiogroup and Checkbox cells.
Default value: 0 (the number of columns is selected automatically based on the available column width)
- Type:
- number readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Accepted values:
- 0 , 1 , 2 , 3 , 4
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- cellType
Minimum column width in CSS values.
- Type:
- string readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- width
An array of matrix columns.
For a Single-Select Matrix, the columns array can contain configuration objects with the text (display value) and value (value to be saved in survey results) properties. Alternatively, the array can contain primitive values that will be used as both the display values and values to be saved in survey results.
For a Multi-Select Matrix or Dynamic Matrix, the columns array should contain configuration objects with properties described in the MatrixDropdownColumn API Reference section.
- Type:
- any[] readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionMatrixDropdownModelBase
A Boolean expression that is evaluated against each matrix column. If the expression evaluates to false, the column becomes hidden.
A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
Use the {item} placeholder to reference the current column in the expression.
Refer to the following help topic for more information: Conditional Visibility.
- Type:
- string readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- rowsVisibleIf
An array of survey elements (questions and panels) to be displayed in detail sections.
Detail sections are expandable panels displayed under each matrix row. You can use them to display questions that do not fit into the row.
Set the detailPanelMode property to "underRow" or "underRowSingle" to display detail sections.
- Type:
- IElement[] readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- detailPanel
Specifies the error message position for questions within detail sections.
Possible values:
"default"(default) - Inherits the setting from theerrorLocationproperty."top"- Displays error messages above questions."bottom"- Displays error messages below questions.
- Type:
- string readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- default
- Accepted values:
- default , top , bottom
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- cellErrorLocation
Contains a PanelModel instance that represents a detail section template.
- Type:
- PanelModel readonly
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- detailElements * , detailPanelMode
Specifies the location of detail sections.
Possible values:
"underRow"- Displays detail sections under their respective rows. Users can expand any number of detail sections."underRowSingle"- Displays detail sections under their respective rows, but only one detail section can be expanded at a time."none"(default) - Hides detail sections.
Use the detailElements property to specify content of detail sections.
- Type:
- string readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- none
- Accepted values:
- none , underRow , underRowSingle
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- detailPanel
Specifies how to arrange matrix questions.
Possible values:
"table"- Displays matrix questions in a table."list"- Displays matrix questions one under another as a list."auto"(default) - Uses the"table"mode if the survey has sufficient width to fit the table or the"list"mode otherwise.
- Type:
- "auto" | "table" | "list" readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- auto
- Accepted values:
- auto , table , list
- Implemented in:
- QuestionMatrixDropdownModelBase
Returns a matrix column with a given name or null if a column with this is not found.
- Type:
- (columnName: string) => MatrixDropdownColumn
- Parameters:
-
columnName, type: string ,
A column name.
- Implemented in:
- QuestionMatrixDropdownModelBase
Returns an object with row values. If a row has no answers, this method returns an empty object.
- Type:
- (rowIndex: number) => any
- Parameters:
-
rowIndex, type: number ,
A zero-based row index.
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- setRowValue
Returns the question type. Possible values:
- "boolean"
- "checkbox"
- "comment"
- "dropdown"
- "tagbox"
- "expression"
- "file"
- "html"
- "image"
- "imagepicker"
- "matrix"
- "matrixdropdown"
- "matrixdynamic"
- "multipletext"
- "panel"
- "paneldynamic"
- "radiogroup"
- "rating"
- "ranking"
- "signaturepad"
- "text"
- Type:
- () => string
- Implemented in:
- QuestionMatrixDropdownModelBase
Returns true if columns are placed in the horizontal direction and rows in the vertical direction.
To specify the layout, use the transposeData property. If you set it to true, the survey applies it only when the screen has enough space. Otherwise, the survey falls back to the original layout, but the transposeData property remains set to true. Unlike transposeData, the isColumnLayoutHorizontal property always indicates the current layout.
- Type:
- boolean readonly
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- transposeData
An error message displayed when users enter a duplicate value into a column that accepts only unique values (isUnique is set to true or keyName is specified).
A default value for this property is taken from a localization dictionary. Refer to the following help topic for more information: Localization & Globalization.
- Type:
- string writable
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- useCaseSensitiveComparison
A placeholder for Dropdown matrix cells.
- Type:
- string writable
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- cellType
A width for the column that displays row titles (first column). Accepts CSS values.
- Type:
- string readonly
- Implemented in:
- QuestionMatrixDropdownModelBase
An array of matrix rows.
This array can contain primitive values or objects with the text (display value) and value (value to be saved in survey results) properties.
- Type:
- any[] readonly
- Implemented in:
- QuestionMatrixDropdownModelBase
A Boolean expression that is evaluated against each matrix row. If the expression evaluates to false, the row becomes hidden.
A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
Use the {item} placeholder to reference the current row in the expression.
Refer to the following help topic for more information: Conditional Visibility.
- Type:
- string readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- visibleRows * , columnsVisibleIf
Assigns values to a row.
- Type:
- (rowIndex: number, rowValue: any) => any
- Parameters:
-
rowIndex, type: number ,
A zero-based row index.
rowValue, type: any ,An object with the following structure:
{ "column_name": columnValue, ... }
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- getRowValue
Specifies whether to display the table header that contains column captions.
Default value: true
- Type:
- boolean readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- True
- Implemented in:
- QuestionMatrixDropdownModelBase
A title template that applies when the survey is in input-per-page mode.
Default value: "Row {rowIndex}" for Dynamic Matrix | "{rowTitle}" for Multi-Select Matrix
The template can contain the following placeholders:
{rowIndex}- A row index within the collection of all rows. Starts with 1.{visibleRowIndex}- A row index within the collection of visible rows. Starts with 1.{rowName}- A row name (thevalueproperty within objects in therowsarray). Use this placeholder if you need to distinguish between matrix rows.{rowTitle}- A row title (thetextproperty within objects in therowsarray).{row.columnname}- The value of a cell in the same row.
- Type:
- string writable
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionMatrixDropdownModelBase
- Available since:
- v2.0.6
Specifies whether to display columns as rows and rows as columns.
Default value: false
- Type:
- boolean readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionMatrixDropdownModelBase
Enables case-sensitive comparison in columns with the isUnique property set to true.
When this property is true, "ABC" and "abc" are considered different values.
Default value: false
- Type:
- boolean writable
- Implemented in:
- QuestionMatrixDropdownModelBase
- Available since:
- v2.0.0
- See also:
- keyDuplicationError *
Aligns matrix cell content in the vertical direction.
- Type:
- "top" | "middle" readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- middle
- Accepted values:
- top , middle
- Implemented in:
- QuestionMatrixDropdownModelBase
Returns an array of visible matrix rows.
- Type:
- MatrixDropdownRowModelBase[] readonly
- Implemented in:
- QuestionMatrixDropdownModelBase
- See also:
- rowsVisibleIf
Send feedback to the SurveyJS team
Need help? Visit our support page