How to store data in app.UITable
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I was trying to insert date from date picker in 2nd column of UITable with the corresponding . But, it only display in date vector format. May I know where is my mistake?
rownum = app.Spinner.Value;
date = char(app.DatePicker.Value);
app.UITable.ColumnFormat = {'numeric','char'};
app.UITable.Data(rownum,:) = [rownum,date];
Btw, I had tried with datestr and cellstr. But nothing work
6 commentaires
Mohammad Sami
le 17 Mar 2020
Can you try using a table variable instead.
You can add a property to store the table.
% startup function to initialise the table
% add a property tablevar
% app.tablevar = table(....)
app.uitable.Data = app.tablevar;
% callback
app.tablevar.date(rownum) = datestr(app.DatePicker.Value);
app.uitable.Date = app.tablevar;
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!