How to add a row to a table and set the column format in App Designer?
5 views (last 30 days)
Show older comments
I have a function to add a new empty row to a table existing:
data = app.workload_table.Data;
row = size(data,1);
row = row + 1;
data(row,:) = {' '};
app.workload_table.Data = data;
The table is initializing with a row and a ColumnFormat for that initial row in startupFcn. That works. But when I add a new row following the before method, I cannot change the ColumnFormat to keep the same format in the new row added. The table format is:
app.workload_table.ColumnFormat = {'char','numeric','numeric','numeric','numeric','numeric'};
That line is the same it is in startupFcn and there it works. But if I write it in the add rows function, doesn't work. The row is added but the column format of that doesn't. The column format of the initial row (the first row) is kept and is ok.
Where or how I have to write that sentences to change the column format of the row added?
Thanks.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!