How can I add DropDown Menus in multiple Cells of a particular Column in a UITable in App Designer?
11 views (last 30 days)
Show older comments
I was able to populate the data into the UITable, but I want to make a column editible by placing a dropdown in a cell with three options/items within the dropdown and the amount of data within the UITable varies. I don't want to make multiple app.___DropDown to be inserted in each cell, but the same app component within each cell. I don't know if it's possble, but please let me know or if there is a UITable property that makes the cells of particular column in DropDown menus without having to do anything super complex.
0 Comments
Accepted Answer
Voss
on 22 Aug 2023
Yes, you can set the ColumnFormat of that column to a cell array containing the dropdown items. The same items will appear in all dropdowns in that column of the uitable.
For example:
col_format = {'numeric' {'Yes' 'No'} 'numeric'};
data = {1 'Yes' 3; 11 'No' 6.5; 7.77 'No' 9; 10 'Yes' 12.13};
t = uitable( ...
'Data',data, ...
'ColumnFormat',col_format, ...
'ColumnEditable',true(1,size(data,2)));
3 Comments
More Answers (0)
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!