Main Content

addRow

Class: Simulink.dialog.parameter.CustomTable
Package: Simulink.dialog.parameter

Add a new row in the custom table

Syntax

NewRow = tableControl.addRow(RowValue)

Description

NewRow = tableControl.addRow(RowValue) adds a row with the specified properties in the custom table.

Input Arguments

expand all

Handle to the custom table, specified as an object. You can use the getDialogControl command to get the custom table handle. For more information, see getDialogControl.

Consider, for example, tableControl = maskObj.getDialogControl(TableName). Here, maskObj is the mask object and TableName is the name of the custom table.

Data Types: char vector

Row values specified for the number of columns available. If five values are provided for RowValue in a custom table with five columns, one row is added to the table. If 10 row values are added for such a table, then two rows are added.

Consider, for example, tableControl = maskObj.getDialogControl(TableName). Here, maskObj is the mask object and TableName is the name of the custom table.

Data Types: char vector | cell array

Examples

% Get block mask handle.
maskObj = Simulink.Mask.get(gcb); 

% Get custom table handle.
tableControl = maskObj.getDialogControl('myTable');

% Add a row with six column values.
tableControl.addRow(  'sig5', 'Input', 'Inherit', 'Inherit', 'on', 'Inherit' ); 

Introduced in R2019a