Main Content

insertRow

Class: Simulink.dialog.parameter.CustomTable
Namespace: Simulink.dialog.parameter

Insert a row at a specific position in a custom table

Syntax

InsertedRow = tableControl.insertRow(rowIndex,string1,string2)

Description

InsertedRow = tableControl.insertRow(rowIndex,string1,string2) inserts a row with specified properties at the specified index in a 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 Simulink.dialog.Container.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 | cell array

Index in table at which the new row is to be inserted.

For example, '4'.

Examples

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

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

% Insert Row.
tableControl.insertRow(rowIndex,'insertSig4',...
     'Input','Inherit','Inherit','on','Inherit'); 

Version History

Introduced in R2019a