![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1431713/image.gif)
How to add a dropdown component in a single cell of a table in app designer?
조회 수: 37 (최근 30일)
이전 댓글 표시
I need to add a dropdown component in a single cell ( instead of whole column) of a table . Is it possible ?
댓글 수: 0
채택된 답변
Malay Agarwal
2023년 7월 11일
Hi Alessandro,
Please see the following code snippet to add a dropdown to a particular cell:
% Drop Down Options
options = categorical({'Option 1', 'Option 2'});
% Set the first cell to the first option of the available options
col1 = {options(1); 200};
% Update the table
app.UITable.Data = table(col1);
% Make columns editable so that the default option can be changed
app.UITable.ColumnEditable = true;
This results in the following table:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1431713/image.gif)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!