필터 지우기
필터 지우기

Reorder rows of UITable in app designer

조회 수: 19 (최근 30일)
Massimo
Massimo 2023년 7월 3일
댓글: Danilo Botero Lopez 2024년 2월 20일
Guys I need help, if possibile, about what I'm asking in title.
I have an UITable in app designer which contains 5 rows (and it just has 2 columns). What I need to do is change the order of rows if necessary. For example, I'd need to exchange row 1 with row 4, so that each one take the place of the other row. All this when my app is running. I mean, I launch the app created with app designer and which displays the table I mentioned and while it's running I change the rows as said before (if necessary).
I have looked for infos surfing on web, but I haven't found any infos about this.
Thanks.

채택된 답변

Pratyush
Pratyush 2023년 7월 3일
편집: Pratyush 2023년 7월 4일
Hi Massimo. It is my understanding that you have created a UITable in MATLAB App Designer and you would like to swap a specified pair of rows dynamically while the app is running. Here is how you can achieve it.
% store row-1 and row-4 data in variables
row_1 = app.UITable.Data(1,:);
row_4 = app.UITable.Data(4,:);
% swap the rows 1 and 4
app.UITable.Data(1,:) = row_4;
app.UITable.Data(4,:) = row_1;
Here are a few helpful resources related to UITable in MATLAB App Designer.
  댓글 수: 3
Victor Sainz
Victor Sainz 2024년 1월 29일
Hello @Massimo, I would also like to rearrange rows dynamically. Were you able to find a method?
Thanks,
Danilo Botero Lopez
Danilo Botero Lopez 2024년 2월 20일
I am having same issue here. Is there any we can do?
Best, Danilo

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by