TableCellData1 = timetable2table(joinedtimetable);
app.UITable.Data = TableCellData1;
t_table = app.UITable.Data(:,app.UITable.Data.Properties.VariableNames);
app.UITable.ColumnName = t_table.Properties.VariableNames;
app.UITable.RowName = 'numbered';
app.UITable.ColumnSortable = true;
app.UITable.BackgroundColor = [1 1 .9; .9 .95 1;1 .5 .5];
get(app.UITable);
f_table = app.UITable.Data(:,app.UITable.Data.Properties.VariableNames);
fig = uifigure;
uit = uitable(fig,'Data',f_table,...
'ColumnName',f_table.Properties.VariableNames,...
'RowName',f_table.Properties.RowNames,...
'ColumnWidth',{100});
uit.RowName = 'numbered';
uit.ColumnSortable = true;
uit.BackgroundColor = [1 1 .9; .9 .95 1;1 .5 .5];
uit.Data = f_table;
styleIndices = ismissing(f_table);
[row,col] = find(styleIndices);
s = uistyle('BackgroundColor','black');
addStyle(uit,s,'cell',[row,col]);
uit.DisplayDataChangedFcn = @updatePlot;
set(uit, 'CellSelectionCallBack',[])
set(uit, 'CellSelectionCallBack',@selectionChangeCallBack);
2 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/501212-app-design-ui-figure-how-to-add-excel-like-sort-filter-selection#comment_788369
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/501212-app-design-ui-figure-how-to-add-excel-like-sort-filter-selection#comment_788369
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/501212-app-design-ui-figure-how-to-add-excel-like-sort-filter-selection#comment_789432
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/501212-app-design-ui-figure-how-to-add-excel-like-sort-filter-selection#comment_789432
Sign in to comment.